generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: How do you prevent jump?

Previous Thread :: Next Thread 
Zerio920 is not online. Zerio920
Joined: 06 Apr 2012
Total Posts: 3311
16 Jun 2014 05:25 PM
I've seen some games where jumping is disabled, how would you do that?
Report Abuse
SenseiWarrior is online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
16 Jun 2014 05:27 PM
Well first of all, changing jump to false when it becomes true doesnt work. It will work in solo but not online.
Report Abuse
Zerio920 is not online. Zerio920
Joined: 06 Apr 2012
Total Posts: 3311
16 Jun 2014 05:35 PM
Ah I see. Why is that?
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
16 Jun 2014 05:37 PM
Sensei it does.

It does in a local script.

I have one that clones into a players character on respawn and it works well.

It has a debounce so they can only jump once every 2 seconds.
Report Abuse
SenseiWarrior is online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
16 Jun 2014 05:37 PM
You cant just set something to false and expect it to stop its motion
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
16 Jun 2014 05:37 PM
It works for me. :)
Report Abuse
DeviousDeviation is not online. DeviousDeviation
Joined: 28 Dec 2010
Total Posts: 9306
16 Jun 2014 05:38 PM
@Sensei
Unless it hasn't started moving.

<^V>
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
16 Jun 2014 05:39 PM
player.Character.Humanoid.Changed:connect(function()
player.Character.Humanoid.Jump = false
end)
Report Abuse
SenseiWarrior is online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
16 Jun 2014 05:40 PM
Have you tried it online
Not F7
Actual online
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
16 Jun 2014 05:47 PM
it will work online
Report Abuse
ChaosEspeon is not online. ChaosEspeon
Joined: 02 Jan 2009
Total Posts: 4578
16 Jun 2014 05:58 PM
Dueling is right. I just made a script with the same concept his has.

It worked.
Report Abuse
georgeba is not online. georgeba
Joined: 29 Oct 2011
Total Posts: 1092
16 Jun 2014 06:52 PM
Ok, Here's what I would do.


Create a LocalScript, then paste the following code in...


local player = game.Players.LocalPlayer
humanoid = player.Character:FindFirstChild("Humanoid")
humanoid.Changed:connect(function()
humanoid.Jump = false
end)



Now, put the LocalScript in Starterpack or else it won't work.

Report Abuse
Kinnis97 is not online. Kinnis97
Joined: 21 Feb 2010
Total Posts: 1683
16 Jun 2014 07:02 PM
My game uses those exact lines of code, works 100%.
Report Abuse
Zerio920 is not online. Zerio920
Joined: 06 Apr 2012
Total Posts: 3311
16 Jun 2014 08:16 PM
It seems to work :) Thanks George
Report Abuse
georgeba is not online. georgeba
Joined: 29 Oct 2011
Total Posts: 1092
16 Jun 2014 08:19 PM
No problem Zeiro! If you got any more questions please message me! I am glad I could help! :3
Report Abuse
Zerio920 is not online. Zerio920
Joined: 06 Apr 2012
Total Posts: 3311
17 Jun 2014 11:42 AM
Nevermind, that other guy was right, I tried it online and it didn't work.

How do you do that cloning thing for the localscript?
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
17 Jun 2014 11:44 AM
Weird, works for me.

Do it in a local script inside startergui

plr = game.Players.LocalPlayer
char = plr.Character
hum = char:WaitForChild("Humanoid")

hum.Changed:connect(function()
hum.Jump = false
end)
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
17 Jun 2014 11:49 AM
I'll try mine and see next week.
Report Abuse
Zerio920 is not online. Zerio920
Joined: 06 Apr 2012
Total Posts: 3311
17 Jun 2014 11:53 AM
Still doesn't work online. Works during testing though.
Report Abuse
Zerio920 is not online. Zerio920
Joined: 06 Apr 2012
Total Posts: 3311
17 Jun 2014 12:00 PM
bump

Any ideas?
Report Abuse
SenseiWarrior is online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
17 Jun 2014 12:01 PM
Wow what a suprise, SenseiWarrior was right?

print'sensei was right'
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
17 Jun 2014 12:03 PM
its because char doesn't load instantly

repeat wait() until Workspace[game.Players.LocalPlayer.Name]
char = w/e
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
17 Jun 2014 12:04 PM
warrior don't get ahead of yourself
Report Abuse
Meowcatmaster is not online. Meowcatmaster
Joined: 20 Oct 2012
Total Posts: 769
17 Jun 2014 12:08 PM
Everyone makes mistakes but the best part is to learn from them.
Report Abuse
Zerio920 is not online. Zerio920
Joined: 06 Apr 2012
Total Posts: 3311
17 Jun 2014 12:09 PM
islandmaker I copied the repeat wait() thing but it didn't work
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image