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

How to fix speed script?

Asked by 9 years ago

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:

01local speedBoost = script.Parent
02local function SteppedOn (part)
03local parent = part.Parent
04if game.Players: GetPlayerFromCharacter(parent) then
05    parent.Humanoid.WalkSpeek = 160
06    wait (200)
07    parent.Humanoid.Walkspeed = 160
08end
09end
10 
11speedBoost.Touched:connect(steppedOn)
0
remove lines 5 and 6 Discern 1007 — 9y

2 answers

Log in to vote
1
Answered by
iSvenDerp 233 Moderation Voter
9 years ago

Hi..(I havent tested this) I notice a typo..

1parent.Humanoid.WalkSpeek = 160
1parent.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:)

Ad
Log in to vote
1
Answered by
NotSoNorm 777 Moderation Voter
9 years ago

oko ok ok so I shall b da fixr of all scropts111!!1

01local speedBoost = script.Parent
02local function SteppedOn (part)
03local parent = part.Parent
04if game.Players: GetPlayerFromCharacter(parent) then
05    parent.Humanoid.WalkSpeed = 160 -- error is har
06    wait (200)
07    parent.Humanoid.WalkSpeed = 160 --and har
08end
09end
10 
11speedBoost.Touched:connect(steppedOn)

u c, u spell it as speek first den forgot the captial S on the other line

Answer this question