|
| 16 Jun 2014 10:55 PM |
| I want my game to have everyone walking at 50 seed can someone please make a script for this |
|
|
| Report Abuse |
|
|
georgeba
|
  |
| Joined: 29 Oct 2011 |
| Total Posts: 1092 |
|
|
| 16 Jun 2014 11:39 PM |
function onPlayerEntered(newPlayer) newPlayer.Character.Humanoid.WalkSpeed = 50 end game.Players.ChildAdded:connect(onPlayerEntered)
function onPlayerRespawned(newPlayer) h = newPlayer:findFirstChild("Humanoid") if h ~= nil then if game.Workspace:findFirstChild(h.Parent.Name) ~= nil then h.WalkSpeed = 50 --Make sure this number is the same as the number above. end end end game.Workspace.ChildAdded:connect(onPlayerRespawned)
(This all is a normal script in workspace) |
|
|
| Report Abuse |
|
|
robomax11
|
  |
| Joined: 07 Jul 2011 |
| Total Posts: 6828 |
|
|
| 16 Jun 2014 11:49 PM |
^unefficent
game:GetService('Players').PlayerAdded:connect(function(p) p.CharacterAdded:connect(function(char) char:WaitForChild('Humanoid').WalkSpeed = 50 end) end)
siggys r stupid |
|
|
| Report Abuse |
|
|
Vehkter
|
  |
| Joined: 09 Mar 2014 |
| Total Posts: 152 |
|
|
| 16 Jun 2014 11:55 PM |
^ too efficient
while wait() do player = game.Players.PlayerAdded:wait()
coroutine.wrap(function() while wait() do player.CharacterAdded:wait() repeat wait() until player.Character:FindFirstChild('Humanoid') player.Character.Humanoid.Walkspeed = 50 end end)() end |
|
|
| Report Abuse |
|
|
robomax11
|
  |
| Joined: 07 Jul 2011 |
| Total Posts: 6828 |
|
| |
|
Zokorio
|
  |
| Joined: 27 Jan 2013 |
| Total Posts: 64 |
|
|
| 17 Jun 2014 12:26 AM |
Or you can remove the spaces and make is one line.
game:GetService('Players').PlayerAdded:connect(function(p)p.CharacterAdded:connect(function(char)char:WaitForChild('Humanoid').WalkSpeed = 50 end)end) |
|
|
| Report Abuse |
|
|
Vehkter
|
  |
| Joined: 09 Mar 2014 |
| Total Posts: 152 |
|
|
| 17 Jun 2014 08:17 AM |
@Zok: It only makes it unappealing to look at and annoying to edit later. Is it only me who makes scripts a certain way, and only that way, so they are aesthetically pleasing? |
|
|
| Report Abuse |
|
|