|
so i've ditched my other Gravity Coil ripoff, and instead of it being a tool, the parachute deploys every time you press space the second time. I've got a slight bit of script, but I'm not very good at this, so it's more of a double jump than a parachute. (it kinda works, though)
Anyways, is there a way to reduce the speed a character is falling in a script/function I could look up? |
|
|
|
ROBLOX parachutes are actually made with BodyVelocity and they have no scripting. So maybe, if you made the script so when you double tap space, it makes an InstanceNew BodyVelocity. |
|
|
@blackstride
I knew the answer would make me look stupid, but thanks a ton for your help! :) |
|
|
|
@black
Why not? You helped me out a ton. |
|
|
Oops, I mis-typed. I meant to say you're welcome. Sorry, I'm tired. |
|
|
I'm doing something wrong here, right?
Instance.new("BodyVelocity", script.Parent.Parent.Character.Torso)
BodyVelocity.maxForce = Vector3.new(0, 99999, 0)
BodyVelocity.velocity = Vector3.new(0,-10,0)
Nothing happens when I press the space bar a second time. I can show you the full script, if you'd like. There aren't any errors, either. |
|
|
There's also another thing for BodyVelocity, it's P which is 1250. |
|
|
@black
Thanks. How do I set that, though? I'm assuming Vector3 wouldn't work, as that's XYZ, correct? |
|
|
Yeah, P isn't an XYZ. Not sure as to how you'd set that. |
|
|
I'll just set it new, without Vector3, and see what happens. |
|
|
The script is bugging and I don't know why. Probably because I'm a noob at ending stuff
"end expected to close function at line 8, near eof" |
|
|
@black
Ok, so instead of that, I'm going to try cloning an already made gear into the player's backpack on double jump:
script.Parent.Parent.Character.Torso.Velocity = Vector3.new(0,100,0)
Lighting.ScrubFlower:clone().Parent = player.Backpack
So first, they're propelled into the air, giving them time to take out the parachute. I'll work on the removal, but it doesn't work right now. Am I doing something wrong? |
|
|
|
@black
Nothing. No errors in the output either, except for an error that I already know (and is an error that I don't have to worry about)
When I remove the "clone" thing, it works. |
|
|
local h = part.Parent:findFirstChild("Humanoid")
if h~=nil then
h.Parent.Torso.Velocity=Vector3.new(0,100,0)
wait(0.1) |
|
|
@black
Oh. I did some fiddling and got it to work again, but the tool still doesn't spawn.
"game.Lighting.ScrubFlower:clone().Parent = player.Backpack"
This was based off of a tutorial I found on the wiki. I was thinking about the "player" thing, and I realized I'm not telling it who the player is... |
|
|
I wouldn't use BodyVelocity - that just forces the character to go a certain velocity. I would use BodyForce instead, with a force value of (0, 200, 0) or something like that - play around with the number.
~Upload code to codepad-dot-org with Lua syntax highlighting to preserve indentation and make it easier to read!~ |
|
|
game.Lighting.ScrubFlower:clone().Parent = player.Backpack should work, is ScrubFlower in Lighting? |
|
|
@black
Yep. There's probably something wrong with the whole script.... but I'm not getting any errors, apart from the ones I stated before!
|
|
|
|
@black
Black? Black? BLAAAAAAAAAAAAAAACK! |
|
|