So I have this script
local Nuber = 20
local NuberGoal = 21
wait(1)
if Nuber > NuberGoal then
script.Parent.CanCollide = false
else
script.Parent.CanCollide = true
end
And I want it to change the Nuber > NuberGoal part to something along the lines of when someone touches it from a certain direction it turns off CanCollide. Can someone help me?

3 comments
Please put your code in to a code block to make it easier to read.
Look into the touched event
Edited to fix code formatting.