|
| 23 Oct 2014 02:45 AM |
So basically what im trying to do is get it so that you can't move until 5 seconds is over and it makes ur speed 11
speed = 0
function onPlayerEntered(Player) if Player.Character == nil then repeat wait() until Player.Character ~= nil x = Player.Character:findFirstChild("Humanoid") x.WalkSpeed = speed if Player.Character == nil then repeat wait()until Player.Character ~=nil x = Player.Character:findFirstChild("Humanoid") wait(5) x.Walkspeed = 11 end end end
game.Players.ChildAdded:connect(onPlayerEntered)
It sets my speed to 0 but doesn't make it 11 |
|
|
| Report Abuse |
|
|
Vulnerite
|
  |
| Joined: 05 Nov 2007 |
| Total Posts: 11492 |
|
|
| 23 Oct 2014 03:10 AM |
speed = 0
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(char) local hum = char.Humanoid hum.WalkSpeed = speed delay(5, function() speed = 11 end) end) end) |
|
|
| Report Abuse |
|
|
Vulnerite
|
  |
| Joined: 05 Nov 2007 |
| Total Posts: 11492 |
|
|
| 23 Oct 2014 03:11 AM |
oops missed a line
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(char) local hum = char.Humanoid hum.WalkSpeed = speed delay(5, function() speed = 11 end) hum.WalkSpeed = speed end) end)
|
|
|
| Report Abuse |
|
|
|
| 23 Oct 2014 07:37 AM |
Still stuck and won't go to 11 walkspeed =/
Tried editing yours but still doesn't work for me |
|
|
| Report Abuse |
|
|
|
| 23 Oct 2014 08:47 AM |
x.Walkspeed = 11
Not sure whether it matters or not, but I've noticed you haven't capitalized the 'S' in speed, but you have for the one prior to that. |
|
|
| Report Abuse |
|
|
|
| 23 Oct 2014 08:52 AM |
speed = 0
function onPlayerEntered(Player) if Player.Character == nil then repeat wait() until Player.Character ~= nil x = Player.Character:findFirstChild("Humanoid") x.WalkSpeed = speed if Player.Character == nil then repeat wait() until Player.Character ~= nil x = Player.Character:findFirstChild("Humanoid") wait(5) x.WalkSpeed = 11 end end end
game.Players.ChildAdded:connect(onPlayerEntered)
Doesn't look like much has been changed, but just try it. |
|
|
| Report Abuse |
|
|
|
| 23 Oct 2014 09:06 AM |
Thanks but I just like combinded two scripts and now this works
idk but yea
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(char) local hum = char.Humanoid hum.WalkSpeed = speed delay(5, function() speed = 0 end) hum.WalkSpeed = speed end) end) function onPlayerEntered(newPlayer) wait(20) newPlayer.Character.Humanoid.WalkSpeed = 9 end
game.Players.PlayerAdded:connect(onPlayerEntered) |
|
|
| Report Abuse |
|
|
|
| 23 Oct 2014 08:53 PM |
game.Players.PlayerAdded:connect(function(Player) local Humanoid = Player.Character.Humanoid Humanoid.WalkSpeed = 0 wait(5) Humanoid.WalkSpeed = 11 end)
It's simple. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 23 Oct 2014 08:58 PM |
| That's not going to work. Their Character won't exist right when they join. Use CharacterAdded |
|
|
| Report Abuse |
|
|