I'm trying to learn how to script and I'm starting off with trying to increase the characters movement speed when it touches a brick but it's not working?
local brick = script.parent
script.Parent.Touched:connect(function(hit)
local character = hit.Parent
character.WalkSpeed = 50
end)
Thanks for any help!

1 comment
You have to make sure hit is actually a character by inserting: if character:("Humanoid") then between lines 4 and 5