|
| 19 May 2014 06:52 PM |
| How can I disable jumping for a character? |
|
|
| Report Abuse |
|
|
MrChubbs
|
  |
| Joined: 14 Oct 2010 |
| Total Posts: 4969 |
|
|
| 19 May 2014 06:53 PM |
| .Changed event on the humanoid and set jump to false. |
|
|
| Report Abuse |
|
|
Jdad
|
  |
| Joined: 12 Jan 2009 |
| Total Posts: 5143 |
|
|
| 19 May 2014 06:56 PM |
Chubbs Once a jump is in motion it can't be cancelled.
I'd suggest using a bodyforce in the torso to push the body down with just enough force that it counteracts jumping.
Or delete the ROBLOX default character and rescript your own.
[ Karmavore || Legit Threads :: http://www.roblox.com/Forum/ShowPost.aspx?PostID=134583049 ] |
|
|
| Report Abuse |
|
|
MrChubbs
|
  |
| Joined: 14 Oct 2010 |
| Total Posts: 4969 |
|
|
| 19 May 2014 07:00 PM |
| Worked fine for me last time I did it. |
|
|
| Report Abuse |
|
|
Jdad
|
  |
| Joined: 12 Jan 2009 |
| Total Posts: 5143 |
|
|
| 19 May 2014 07:04 PM |
I guarantee it didn't work Chubbs.
[ Karmavore || Legit Threads :: http://www.roblox.com/Forum/ShowPost.aspx?PostID=134583049 ] |
|
|
| Report Abuse |
|
|
|
| 20 May 2014 02:11 PM |
@Jdad, It works, proof in No way out which is one of my places... @OP, Place this script in Workspace. ___________________________________________ game.Workspace.ChildAdded:connect(function(char) if char:FindFirstChild("Humanoid") then script.JumpDisabler:clone().Parent = char wait(0) else return end end) ___________________________________________ Place this one in the script above. Make sure it's a local-script! Oh and it must be called "JumpDisabler" ___________________________________________ script.Parent:WaitForChild("Humanoid").Changed:connect(function(change) script.Parent:WaitForChild("Humanoid").Jump = false wait(0) end)
|
|
|
| Report Abuse |
|
|
|
| 20 May 2014 02:24 PM |
@above
You could just use PlayerAdded, no LocalScript required. |
|
|
| Report Abuse |
|
|
|
| 20 May 2014 02:24 PM |
| Not to mention that won't work. |
|
|
| Report Abuse |
|
|
|
| 20 May 2014 02:32 PM |
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) character.Humanoid.Changed:connect(function() character.Humanoid.Jump = false end) end) end)
I didn't test this but it should work. |
|
|
| Report Abuse |
|
|
|
| 20 May 2014 02:35 PM |
It won't.
Just making Jump false when they make it true don't stop anything.
That would be like if someone enabled a script, so you automatically disabled it. The script will still go through its code.
The jump will still happen |
|
|
| Report Abuse |
|
|
|
| 20 May 2014 02:44 PM |
| Not true. I have a game that uses this similar code. Your statement is only created by your own theory and you have no evidence to back it up. Setting the jump to false works, unless some Roblox update has recently broken it. |
|
|
| Report Abuse |
|
|
|
| 20 May 2014 02:54 PM |
@warspy, PlayerAdded works for a single time. Respawning won't fire the function. |
|
|
| Report Abuse |
|
|
|
| 20 May 2014 02:57 PM |
p = game.Players.LocalPlayer repeat wait() until p.Character c = p.Character c.Humanoid.Changed:connect(function() v = c.Torso.Velocity x,z = v.X,v.Z c.Torso.Velocity = Vector3.new(x,0,z) c.Humanoid.Jump = false end)
works nicely |
|
|
| Report Abuse |
|
|
|
| 20 May 2014 03:04 PM |
Why not put this into a localscript inside StarterGui:
game.Players.LocalPlayer.CharacterAdded:connect(function(char) while char do wait() --Not sure if I need the wait here, since the next line waits for Humanoid to be found. char:WaitForChild("Humanoid").Jump = false end end)
Here's my siggy... Done. |
|
|
| Report Abuse |
|
|
| |
|
|
| 20 May 2014 03:22 PM |
@war Please enlighten me, I'd just like to know why it won't work.
Here's my siggy... Done. |
|
|
| Report Abuse |
|
|
|
| 20 May 2014 03:24 PM |
NVM, ignore me, I found out for myself xD
Here's my siggy... Done. |
|
|
| Report Abuse |
|
|
Jdad
|
  |
| Joined: 12 Jan 2009 |
| Total Posts: 5143 |
|
|
| 20 May 2014 03:24 PM |
Because once it's already in motion it will not stop.
You guys are sad.
[ Karmavore || Legit Threads :: http://www.roblox.com/Forum/ShowPost.aspx?PostID=134583049 ] |
|
|
| Report Abuse |
|
|
|
| 20 May 2014 03:27 PM |
| XD I'm surprised they did not know that... They even said they tested it when obviously they never |
|
|
| Report Abuse |
|
|
|
| 20 May 2014 03:28 PM |
@war I never said I tested it... :P ...I need to get my head in gear today, man. XD
Here's my siggy... Done. |
|
|
| Report Abuse |
|
|
Jdad
|
  |
| Joined: 12 Jan 2009 |
| Total Posts: 5143 |
|
|
| 20 May 2014 03:39 PM |
I just added this segment into my character script for my zombie game,
human.Changed:connect(function() -- human is the humanoid var if human.Jump == true then human.Jump = false end end)
Guess what?
It didn't work.
[ Karmavore || Legit Threads :: http://www.roblox.com/Forum/ShowPost.aspx?PostID=134583049 ] |
|
|
| Report Abuse |
|
|