Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do you make a user have fast walkspeed ontouch a brick?

**Hi guys, I'm a beginner scripter, and I need some help with a brick that will change the user's walkspeed.

Think you can help? Thanks!

What I have so far looks like

local.workspace.humanoid.(user).ontouch.walkspeed-50

That seems right to me, but as I said, I'm a beginner.

Please help, I'd appreciate it ALOT.

-DevNitroade100**

1 answer

✓ Accepted answer

insert the following > script inside the part

function speedup(hit)
if hit and hit.Parent and hit.Parent ~= script.Parent then -- makes sure everything is correct, like if it isn't touching itself

if hit.Parent:FindFirstChild("Humanoid") then -- make sure the thing that touched the button is an actual person
local humanoid = hit.Parent:FindFirstChild("Humanoid")
humanoid.WalkSpeed = 50 -- sets the speed
end
end
end

script.Parent.Touched:connect(speedup)

1 comment

0

Thank you so much! :) You saved my game from becoming a nonworking piece of junk xD

This discussion is preserved as it was. New answers, comments, and votes are closed.