Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Thanks for 100 views!!!!!
- -- Script by Alvinblox, just wanted to post this on pastebin.
- -- Make sure there is TWO ends
- -- Make a door, also make a keycard, name the keycard "Keycard", put a script into the door, and paste this
- local waitime = 2 -- How long it takes before it turns to normal
- script.Parent.Touched:Connect(function(hit) -- Hit function
- if hit.Parent.Name == "Keycard" then -- If the Keycard hits the door
- script.Parent.Transparency = 0.5 -- The door opening
- script.Parent.CanCollide = false -- Going through the door
- wait(waitime) -- Waits until it can close
- script.Parent.Transparency = 0 -- The door closing
- script.Parent.CanCollide = true -- You can no longer go through unless the Keycard touches it again
- end -- An end
- end) -- An end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement