Hello! I made a script for when players touch the brick its in they get a speed boost, Could you help me fix it? Heres the script:
01 | local speedBoost = script.Parent |
02 | local function SteppedOn (part) |
03 | local parent = part.Parent |
04 | if game.Players: GetPlayerFromCharacter(parent) then |
05 | parent.Humanoid.WalkSpeek = 160 |
06 | wait ( 200 ) |
07 | parent.Humanoid.Walkspeed = 160 |
08 | end |
09 | end |
10 |
11 | speedBoost.Touched:connect(steppedOn) |
Hi..(I havent tested this) I notice a typo..
1 | parent.Humanoid.WalkSpeek = 160 |
1 | parent.Humanoid.WalkSpeed = 160 -- it needs to be WalkSpeed |
Hope this helped let me know if it did besides that your script should work but remember lua is very case sensitive:)
oko ok ok so I shall b da fixr of all scropts111!!1
01 | local speedBoost = script.Parent |
02 | local function SteppedOn (part) |
03 | local parent = part.Parent |
04 | if game.Players: GetPlayerFromCharacter(parent) then |
05 | parent.Humanoid.WalkSpeed = 160 -- error is har |
06 | wait ( 200 ) |
07 | parent.Humanoid.WalkSpeed = 160 --and har |
08 | end |
09 | end |
10 |
11 | speedBoost.Touched:connect(steppedOn) |
u c, u spell it as speek first den forgot the captial S on the other line