|
| 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
|
  |
| 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 |
|
|
|
| 21 Jun 2015 08:42 AM |
| the mental illness is strong with this one. |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
|
| 21 Jun 2015 08:55 AM |
Will not waste more time on this thread, Ty.
Ciao. ~prestigious |
|
|
| Report Abuse |
|
|
Luminak
|
  |
| Joined: 27 May 2012 |
| Total Posts: 2809 |
|
| |
|
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
|
  |
| 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
|
  |
| Joined: 14 Oct 2009 |
| Total Posts: 18429 |
|
|
| 21 Jun 2015 09:07 AM |
| Both sides are counter productive. |
|
|
| Report Abuse |
|
|
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
|
  |
| 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 |
|
|