So I have this script
1 | local Nuber = 20 |
2 | local NuberGoal = 21 |
3 | wait( 1 ) |
4 | if Nuber > NuberGoal then |
5 | script.Parent.CanCollide = false |
6 | else |
7 | script.Parent.CanCollide = true |
8 | 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?
put a hit function in there somewhere, you want it to be a touch, right?
1 | script.Parent.Touched:connect( |
2 | function (hit) |
3 | --code |
4 | end ) |
I'm basic, my mind is simplicity, but at the same time,t his might help a lot.