Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Can someone help we a part for a script that don't work?

Asked by 10 years ago
game.Players.LocalPlayer.Character.Humanoid.WalkSpeed =  +  20

2 answers

Log in to vote
2
Answered by 10 years ago

First of all, I'm not sure if you can do =+ in Lua, I think you might need to actually say

game.Players.LocalPlayer.Character.Humanoid.WalkSpeed=game.Players.LocalPlayer.Character.Humanoid.WalkSpeed +  20

Also, this needs to be run in a LocalScript, or else LocalPlayer cannot be defined. I can't help you other than that without any output.

-- Leave a +1 Rep if I helped <3

2
The operator in most languages is `+=` (not `=+` because this parses validly as `=    +`) but Lua lacks it. BlueTaslem 18071 — 10y
0
Cant remember what language I used it in, I don't think Python has Increments ;-; LunaScripter 80 — 10y
Ad
Log in to vote
-1
Answered by
funzrey 58
10 years ago

Oh! That is so easy, If you want to do it my way, Just use this code I dont know how to find the player, So lets just say your player.

game.Players.MrGameMasters1.Character.Humanoid.Walkspeed = game.Players.MrGameMasters1.Character.Humanoid.Walkspeed + 20

(Not Copied, I just thought no one would answer, Used in a script, not in a localscript Unless your using localplayer) Tell me if it works, If not, Change Humanoid To Humaniod, Cause i might've got it wrong

0
Humanoid is spelt correctly there. Good guess. fahmisack123 385 — 10y
0
ok thanks, please 1 up my post, I'd one up yours if i had 1 rep, i lost my rep from noobs. funzrey 58 — 10y

Answer this question