Beginners Advanced Guide to Roblox

Become a Brick-smith in no time!

How to make a one way door September 30, 2009

Filed under: Begginners Guide to advanced scripting — pokemonfan143 @ 2:06 pm
Tags: , , , , , ,

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)
 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.