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 » Scripters
Home Search
 

Re: AntiJump works 1st life but not after death

Previous Thread :: Next Thread 
PRESTIGIOUSaLEGEND is not online. PRESTIGIOUSaLEGEND
Joined: 16 Apr 2011
Total Posts: 1765
21 Jun 2015 08:33 AM
I have set my playergui to not reset on spawn and for this reason, my antijump is not recognizing the new spawned character as the one it should be acting on.

extract of localscript inside startergui:

player.Character.Humanoid.Changed:connect(function()
if player.Character.Humanoid.Jump == true then
player.Character.Humanoid.Jump = false
end end)

---------problem------------
antijump works on 1st life, but after death, no longer works.
----------------------------

All help appreciated proving it is not troll :3
Report Abuse
Luminak is not online. Luminak
Joined: 27 May 2012
Total Posts: 2809
21 Jun 2015 08:38 AM
game.Players.PlayerAdded:connect(function(newPlayer)
newPlayer.Respawned:connect(function(respawn)
if player.Character.Humanoid.Jump == true then
player.Character.Humanoid.Jump = false
end)
end)
Report Abuse
PRESTIGIOUSaLEGEND is not online. PRESTIGIOUSaLEGEND
Joined: 16 Apr 2011
Total Posts: 1765
21 Jun 2015 08:42 AM
the mental illness is strong with this one.
Report Abuse
Sinfesizer is not online. Sinfesizer
Joined: 18 Apr 2015
Total Posts: 46
21 Jun 2015 08:44 AM
-- LocalScript in StarterGui / StarterPack

local Player = game:GetService("Players").LocalPlayer
local Character = Player.Character or Player.CharacterAdded:wait()
local Humanoid = Character:WaitForChild("Humanoid")

Humanoid.Changed:connect(function()
Humanoid.Jump = false
end)
Report Abuse
Luminak is not online. Luminak
Joined: 27 May 2012
Total Posts: 2809
21 Jun 2015 08:46 AM
prest ok you can be lazy and not try it, and never get an answer :D
Report Abuse
PRESTIGIOUSaLEGEND is not online. PRESTIGIOUSaLEGEND
Joined: 16 Apr 2011
Total Posts: 1765
21 Jun 2015 08:54 AM
Ty synthesizer but i found a different solution :)

@TrollScripter...

1) game.Players.PlayerAdded:connect(function(newPlayer)
2) newPlayer.Respawned:connect(function(respawn)
3) if player.Character.Humanoid.Jump == true then
4) player.Character.Humanoid.Jump = false
5) end)
6) end)

L2 Respawned isnt an event,
L2 respawn is a redundant parameter
L3,4 Fires immediately and never again
L5 should be an end for L3 if statement followed by
L6,7 end) stack

6 lines you wrote and 5 immediate problems, if thats not troll then please please please go learn to script again.
Report Abuse
PRESTIGIOUSaLEGEND is not online. PRESTIGIOUSaLEGEND
Joined: 16 Apr 2011
Total Posts: 1765
21 Jun 2015 08:55 AM
Will not waste more time on this thread, Ty.

Ciao. ~prestigious
Report Abuse
Luminak is not online. Luminak
Joined: 27 May 2012
Total Posts: 2809
21 Jun 2015 09:03 AM
prest you are stupid af
Report Abuse
DrSaint is not online. DrSaint
Joined: 14 Oct 2009
Total Posts: 18429
21 Jun 2015 09:05 AM
@Lum

Respawn is not a proper event. CharacterAdded is.
Report Abuse
Egzekiel is not online. Egzekiel
Joined: 10 Jan 2011
Total Posts: 1079
21 Jun 2015 09:06 AM
I wonder who is stupid between him trying to find an answer and you flaming ?
Report Abuse
DrSaint is not online. DrSaint
Joined: 14 Oct 2009
Total Posts: 18429
21 Jun 2015 09:07 AM
Both sides are counter productive.
Report Abuse
Egzekiel is not online. Egzekiel
Joined: 10 Jan 2011
Total Posts: 1079
21 Jun 2015 09:13 AM
True.

local TimeBetweenJumps = math.huge

local Player = game.Players.LocalPlayer
repeat wait() until Player.Character ~= nil
local Character = Player.Character
local Humanoid = Character:WaitForChild("Humanoid")

local LastJump = time()
Humanoid.Changed:connect(function()
if Humanoid.Jump then
if time()-LastJump >= TimeBetweenJumps then
LastJump = time()
else
Humanoid.Jump = false
end
end
end)

Not anymore :3
Report Abuse
tbnj123 is online. tbnj123
Joined: 29 Oct 2010
Total Posts: 443
21 Jun 2015 09:17 AM
player.CharacterAdded:connect(function(char)
char:WaitForChild("Humanoid").Changed:connect(function()
if char:WaitForChild("Humanoid").Jump == true then
char:WaitForChild("Humanoid").Jump = false
end
end)
end)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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