Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you make a door that when closed kills, but when opened allows you to pass?

Asked by 7 years ago

I'm trying to make a laser door, but I can't figure out how to. My script won't even open the door, and the door won't even kill you. So thanks if you can help.

01local isOn = true
02local Brick = script.Parent
03local kill = true
04 
05function on()
06 isOn = true
07 script.Parent.Transparency = .8
08 script.Parent.CanCollide = true
09if kill == true then
10    local function PlayerTouched(Part)
11    local Parent = Part.Parent
12    if game.Players:GetPlayerFromCharacter(Parent) then
13        Parent.Humanoid.Health = 0
14    end
15end
View all 34 lines...

Im a bit of a noob, so please go easy on me! :)

1 answer

Log in to vote
0
Answered by 7 years ago

There is a tutorial for a VIP door that may work without VIP. http://wiki.roblox.com/index.php?title=Restricted_door

0
It isn't a vip door... CaptainAlien132 225 — 7y
0
I know but if you copy certain scripts but ignore the scripts that say VIP you can make this door billybobRAE 41 — 7y
Ad

Answer this question