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: 50 Speed script

Previous Thread :: Next Thread 
fuzzballgame is not online. fuzzballgame
Joined: 14 Sep 2013
Total Posts: 73
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 is not online. 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 is not online. 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 is not online. 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 is not online. robomax11
Joined: 07 Jul 2011
Total Posts: 6828
16 Jun 2014 11:55 PM
^thx

siggys r stupid
Report Abuse
Zokorio is not online. 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 is not online. 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
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