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 8 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:

local speedBoost = script.Parent
local function SteppedOn (part)
local parent = part.Parent
if game.Players: GetPlayerFromCharacter(parent) then
    parent.Humanoid.WalkSpeek = 160
    wait (200)
    parent.Humanoid.Walkspeed = 160
end 
end

speedBoost.Touched:connect(steppedOn)
0
remove lines 5 and 6 Discern 1007 — 8y

2 answers

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

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

parent.Humanoid.WalkSpeek = 160

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:)

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

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

local speedBoost = script.Parent
local function SteppedOn (part)
local parent = part.Parent
if game.Players: GetPlayerFromCharacter(parent) then
    parent.Humanoid.WalkSpeed = 160 -- error is har
    wait (200)
    parent.Humanoid.WalkSpeed = 160 --and har
end 
end

speedBoost.Touched:connect(steppedOn)

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

Answer this question