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
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Jump Help?

Previous Thread :: Next Thread 
IthacaMedia is not online. IthacaMedia
Joined: 25 Jan 2014
Total Posts: 1337
04 Nov 2014 11:29 AM
I have this LocalScript to try to show an "Exausted" message when the player jumps too much, but it doesn't work. It shows "Exhausted" but doesn't stop the player from jumping. How can I stop the player from jumping for a few seconds?
Report Abuse
Biost is not online. Biost
Joined: 25 Sep 2014
Total Posts: 3922
04 Nov 2014 11:30 AM
Try removing the jump animation when exhusted then cloning it when ready to jump and putting it back in?
Report Abuse
IthacaMedia is not online. IthacaMedia
Joined: 25 Jan 2014
Total Posts: 1337
04 Nov 2014 11:31 AM
That would just get rid of the animation, not the ability to jump.
Report Abuse
lordrambo is not online. lordrambo
Joined: 16 Jun 2009
Total Posts: 20628
04 Nov 2014 11:52 AM
Set up the changed event to the Jump property and then set it instantly to false if the player is exhausted.
Report Abuse
OzzyFin is not online. OzzyFin
Joined: 07 Jun 2011
Total Posts: 3600
04 Nov 2014 11:53 AM
while dontjump do
wait()
player.Jump = false
end


I don't think it works with Changed, so pretty much that.

Anyway, if you want it just for a few seconds you probably have to use coroutines for the most simplest way. yea im very much into coroutines right now as i just read about them for the 1st time, so no dont ask me

Other could be cloning anti jump LocalScript to player's PlayerGui/Backpack and removing after that couple of seconds.
Report Abuse
lordrambo is not online. lordrambo
Joined: 16 Jun 2009
Total Posts: 20628
04 Nov 2014 12:20 PM
Events run the function in another thread anyway. Just use the changed event + if statement.
Report Abuse
OzzyFin is not online. OzzyFin
Joined: 07 Jun 2011
Total Posts: 3600
04 Nov 2014 12:26 PM
Yea, I didn't remember it right.

It works with Changed.
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
04 Nov 2014 12:48 PM
It only works with .Changed from a local script

http://www.roblox.com/item.aspx?id=166964623

this puts a bool value in the player called disableJump, if its true they can't jump

like

game.Players.Player.disableJump = true
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
04 Nov 2014 12:48 PM
game.Players.Player.disableJump.Value = true
*
Report Abuse
robocu3 is not online. robocu3
Joined: 13 Mar 2009
Total Posts: 6485
04 Nov 2014 01:20 PM
local humanoid = humanoidLink
local jumpWait = 1
local start = 0

humanoid.Jumping:connect(function()
humanoid.Jump = (tick() - start) >= jumpWait
start = tick()
end)

-=Robo=-
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
04 Nov 2014 01:23 PM
@Robo
Using the jumping event doesn't work because it fires as the player is jumping

.Changed will fire before the player jumps but when the jump property is true
Report Abuse
robocu3 is not online. robocu3
Joined: 13 Mar 2009
Total Posts: 6485
04 Nov 2014 01:25 PM
i'm aware of that
it will check to see when the previous jump was regardless if it fires multiple times or not
if it fires while in the air it will be set to false by default
extend the time
though, it's worth adding I just read what you wanted
you want it after a few jumps? do a jump count and reset it every couple of seconds post previous jump
-=Robo=-
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
04 Nov 2014 01:29 PM
What do you mean what I want?
I'm not OP o3o

I'm saying your script won't prevent jumping
Report Abuse
robocu3 is not online. robocu3
Joined: 13 Mar 2009
Total Posts: 6485
04 Nov 2014 01:30 PM
was referring to the OP when I typed that, kind of half awake so my grammar is dragging xD
-=Robo=-
Report Abuse
IthacaMedia is not online. IthacaMedia
Joined: 25 Jan 2014
Total Posts: 1337
04 Nov 2014 07:40 PM
From my experience, the .Changed event fires twice when the player jumps for some reason. Or some other event is firing besides jump, maybe falling.
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
04 Nov 2014 07:50 PM
It doesn't matter how many times it fires as long as you set it to false
Report Abuse
IthacaMedia is not online. IthacaMedia
Joined: 25 Jan 2014
Total Posts: 1337
04 Nov 2014 09:41 PM
Ok thanks

@rob

That makes my character not jump forever after the time. I want it to regen after a few seconds.
Report Abuse
GodShowsTheWay is not online. GodShowsTheWay
Joined: 27 Oct 2014
Total Posts: 7180
04 Nov 2014 09:43 PM
Have a value that is true when the play is exhausted and edit the jump script to check if the player is exhausted before jumping.
Report Abuse
GodShowsTheWay is not online. GodShowsTheWay
Joined: 27 Oct 2014
Total Posts: 7180
04 Nov 2014 09:44 PM
Have a value which is either true or false for if a player is exhausted or not.

Edit the jump script to check the value before executing the code to jump.
Report Abuse
IthacaMedia is not online. IthacaMedia
Joined: 25 Jan 2014
Total Posts: 1337
04 Nov 2014 09:49 PM
The code to jump is built-in to ROBLOX though.
Report Abuse
GodShowsTheWay is not online. GodShowsTheWay
Joined: 27 Oct 2014
Total Posts: 7180
05 Nov 2014 03:30 PM
i had nothing to do

http://www.roblox.com/jumptety-jump-place?id=185654471

there u go
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
05 Nov 2014 03:53 PM
good job you did exactly what my script does in a worse way
Report Abuse
EliteDerper is not online. EliteDerper
Joined: 05 Feb 2012
Total Posts: 2288
05 Nov 2014 04:22 PM
BodyPosition can help also
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
05 Nov 2014 04:24 PM
BodyPosition would be really inefficient
Report Abuse
EliteDerper is not online. EliteDerper
Joined: 05 Feb 2012
Total Posts: 2288
05 Nov 2014 04:24 PM
Yes, but it would 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