step = game.Workspace.step function onTouched(hit) human = hit.Parent:FindFirstChild("Humanoid")
step.cancollide = false stem.transpararency = 1 wait (2) step.cancollide = true stem.transpararency = 0 end end
script.Parent.Touched:connect(onTouched)
local step = Workspace:FindFirstChild("step") if step then script.Parent.Touched:connect(function(hit) human = hit.Parent:FindFirstChild("Humanoid") if human then step.CanCollide = false step.Transparency = 1 wait(3) step.CanCollide = true step.Transparency = 0 end end) else error('The step was not found!'); end
This should work.
sometimes adding a debounce is useful, also, make sure to always Capitalize the first letter when changing the Property or else it wont work.
touched = false step.Touched:connect(function(hit) human = hit.Parent:FindFirstChild("Humanoid") if touched == false and h then touched = true step.CanCollide = false step.Transparency = 1 wait(2) step.CanCollide = true stem.Transparency = 0 touched = false end end)