I have a game where you're not supposed to be able to enter the hallway you last entered, and I would like to implement a one-way can-collide brick. Is there any way to do that?
COMMUNITY QUESTION
How do I make a one-way door? [SOLVED]
2 answers
Make an invisible brick in front of the entrance that the player walks through to activate the door. Then, have nothing to open the door on the other side. Basically, put no scripts in the door and put it in the invisible brick.
put
door = script.Parent
function onTouch(hit)
if hit.Parent == nil then return end
local h = hit.Parent:FindFirstChild("Humanoid")
if h ~= nil then
hit.Parent.Torso.Velocity=door.CFrame.lookVector * 10000
end
end
door.Touched:connect(onTouch)
in door you can change 10000 to the force of the vector
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
The door flung me away on either side..
Then you reduce the Velocity on line 7
Still. The door flung be on either side.. If the door has to be cancollide = false, then this is a very weak door. Players who lag can walk through.