So i want to learn how to make a code that recognizes when a player is on something and not. I don’t really know how to do this without loops (if there is a way to do with loops)
Although the idea may be simple to other people, I want to learn how to do this in order to be able to do other things
Local Test = script.parent
Test.Touched:Connect(function(hit)
Local humanoid = hit.Parent:FindFirstChild(“humanoid
If humanoid then
Print(“On Test Part”)
Else
Print(“Not on test part”)
End
End)
The thing with this is the else will not run. This is okay but the thing will only run once per time you touch it so it will only ever be “On test part” anyone know a way to do this?
(Preferably without loops but it there’s no way without loops let me know)