script.Parent.Touched:Connect(function(hit)
local humanoid = hit.Parent:FindFirstChild("Humanoid")
if humanoid ~= nil then
hit.Position = Vector3.new(-18, 0.5, -9)
end
end )
I want to make sure that when the player touches this object (Door) on accident they don't get teleported out.
I'm probably going to end up utilizing a while loop but I don't know what my condition would be exactly to check time.

3 comments
Worked perfectly thank you <3! Why exactly did you decide to make another thread through a coroutine? I kind of understand why here but I'd like to cement my knowledge
I just realized, I didn't answer your question properly. I read the title and read it as "so the player has to touch the object a certain amount of times before it works." Sorry! I made a coroutine because of how touched events work, if you touch an object, and then have just a regular "wait" within the code, it will only handle that single touched event, and then a bunch of other touched events
will fire at the same time. I'm going to re-respond to this again.