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

How do you make your walkspeed go slower for a while after hitting a brick?

Asked by 10 years ago

Please include the code which you are trying to use, so the community will be better-equipped to help you with your problem.

Like, once you touch a brick

Only for about 10 - 15 seconds it slows down your walkspeed. ????

Also should it be a LocalScript or a Script + Where to place it?

0
Please attempt before posting. PiggyJingles 358 — 10y
0
I did xdd + i'm the worst scripter in ROBLOX CrazyRocker60 17 — 10y
0
Can you try posting the code you tried? Thewsomeguy 448 — 10y

1 answer

Log in to vote
2
Answered by 10 years ago

Hmm. Put this script in the desired brick.

script.Parent.Touched:connect(function (hit)
    if not hit.Parent:findFirstChild("Humanoid") then return end -- Makes sure code is only run if it's a player.
    hit.Parent.Humanoid.WalkSpeed = 10 --Reduces walkspeed 
    wait(10)
    hit.Parent.Humanoid.WalkSpeed = 16 -- Puts it back up
end)

I'm Aurum, and you're welcome. Notes added, admin. Merry Christmas. EDITED: Fixed it up. You're welcome... Again.

0
Didn't work CrazyRocker60 17 — 10y
0
Okay, let me check what I did wrong. SquirreIOnToast 309 — 10y
0
Edited. It should work now. SquirreIOnToast 309 — 10y
0
TRhanks man, it worked. CrazyRocker60 17 — 10y
Ad

Answer this question