Im trying to make a brick that lets you walk on it with a certain walkspeed but I thought I did everything right but it does not work. Here it is:
Player = game.Player.LocalPlayer
function onTouch(part)
if Player.Walkspeed = 40 then
part.CanCollide = true
else
part.CanCollide = false
script.Parent.Touched:connect(onTouch)
I still don't see where I'm wrong?

2 comments
You forgot the 'end''s for the code. :/
Edited the script, this should work now.