thetacah
|
  |
| Joined: 18 Jan 2013 |
| Total Posts: 16026 |
|
|
| 14 Aug 2013 05:54 PM |
function changewalkspeed() local Player = game.Players.LocalPlayer Player.Character.Humanoid.WalkSpeed = game.Workspace.walkspeed.Value--walkspeed is a intvalue end script.Parent.MouseButton1Click:connect(changewalkspeed) |
|
|
| Report Abuse |
|
|
| |
|
thetacah
|
  |
| Joined: 18 Jan 2013 |
| Total Posts: 16026 |
|
| |
|
|
| 14 Aug 2013 05:59 PM |
If not make it a Local Script or put this in normal script
game.Players.PlayerAdded:connect(function(player) wait() player.Character.Humanoid.WalkSpeed = game.Workspace.walkspeed.Value end) this on't work in a server
The reason it only works in play solo because everything is client side |
|
|
| Report Abuse |
|
|
|
| 14 Aug 2013 06:00 PM |
| The one I gave you doesn't work in solo. unless you want one that works in both. |
|
|
| Report Abuse |
|
|
|
| 14 Aug 2013 06:06 PM |
You can't use "game.Players.LocalPlayer" in a normal script.
Normal scripts run on the server, thus attempting to do such would not work because your player is client based.
Local scripts are client side, so you'd have to do that but with a localscript.
Or you can just try to define the player a different way. Like, getPlayerFromCharacter(character) |
|
|
| Report Abuse |
|
|