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: Walkspeed changing script not working..

Previous Thread :: Next Thread 
BobGeorgenworn909 is not online. BobGeorgenworn909
Joined: 03 Apr 2008
Total Posts: 1161
02 Sep 2011 07:37 PM
while wait() do
stoof = game.Players:GetChildren()
for i = 1, #stoof do
if stoof[i]:FindFirstChild("Humanoid") then
local walky = stoof[i].leaderstats.WalkSpeed
stoof[i].Humanoid.Walkspeed = walky.Value
end
end
end


It's supposed to set the player's walkspeed to the value in the leaderboards, but doesn't. Can anyone help me on this?
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
02 Sep 2011 07:38 PM
try a different method..
Report Abuse
BobGeorgenworn909 is not online. BobGeorgenworn909
Joined: 03 Apr 2008
Total Posts: 1161
02 Sep 2011 07:40 PM
Only way I "thought" I knew how to do this.
Report Abuse
swmaniac is not online. swmaniac
Joined: 28 Jun 2008
Total Posts: 15773
02 Sep 2011 07:42 PM
1) A while loop? D:

2) Leaderstats is in the player object.


function WaitForDescendant(par, nm)
local desc = par:FindFirstChild(nm, true)
while not (desc and desc.Name == nm) then
desc = par.DescendantAdded:wait()
end
return desc
end


game.Players.PlayerAdded:connect(function(newPlayer)
local ws = WaitForDescendant(newPlayer, "WalkSpeed")
ws.Changed:connect(function(val)
if newPlayer.Character and newPlayer.Character:FindFirstChild("Humanoid") then
newPlayer.Character.Humanoid.WalkSpeed = val
end
end)
end)
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