First Insert a brick of the size you want. Insert a script into the brick. Now type this into the script:
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 * 100 — Push the Player back
end
end
door.Touched:connect(onTouch)
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 * 100 — Push the Player back
end
end
door.Touched:connect(onTouchdoor = 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 * 100 — Push the Player back
end
end
door.Touched:connect(onTouch)