Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Add two parts into Workspace and name one "Door1" and the other"Door2"
- -- Add another part, make it look like a keycard
- -- Add a tool into StarterPack and name it "Keycard"
- -- Add a script into Door1 and type this
- local Door1 = game.Workspace.Door1
- local Door2 = game.Workspace.Door2
- -- You're going to make Door2 Transparency 1 and CanCollide false, or uncheckmarked
- script.Parent.Touched:Connect(function(hit)
- if hit.Parent.Name == "Keycard" then
- Door1.Transparency = 1
- Door2.Transparency = 0
- Door1.CanCollide = false
- Door2.CanCollide = true
- wait(2)
- Door1.Transparency = 0
- Door2.Transparency = 1
- Door1.CanCollide = true
- Door2.CanCollide = false
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement