So, I wanted to make a box that will detect if there's any player close to the door by making a go-through transparent box around the door, it worked. But the problem is that, I don't know how to make sure that after the door opened and the player left the inside of the box (stopped hitting the box), the door will close. open() is a function to open the door and close() is a function to close the door. I don't really think including the full function down below will really affect anything since it's just TweenService.
door = game.Workspace.door1
box = script.Parent
function Ontouch(hit)
open()
--??
close()
end
script.Parent.Touched:Connect(Ontouch)

1 comment
tables my boy, TABLES