wait, can you put that in this script? and would this script work?
bin = script.Parent
permission = { "chrisrune314" , "superj9" , "supercolin" , "auskia" , "sk8terguy" } --Replace "name" with ppl that wont get hurt. Delete Extras.
Door = script.Parent
function onTouched(part)
part.BrickColor = BrickColor.new(26)
wait(.3)
part.Transparency = .2
wait(.1)
part.Transparency = .4
wait(.1)
part.Transparency = .6
wait(.1)
part.Transparency = .8
wait(.1)
backup = part.clone() *_*-*_*-*
else function checkOkToLetIn(name)
for i = 1,#permission do
if (string.upper(name) == string.upper(permission[i])) then return true end
end
return false
end
function onTouched(hit)
print("Door Hit")
local human = hit.Parent:findFirstChild("Humanoid")
if (human ~= nil ) then
-- a human has touched this door!
print("Human touched door")
-- test the human's name against the permission list
if (checkOkToLetIn(human.Parent.Name)) then
print("Human passed test")
Door.Transparency = .6
Door.CanCollide = false
wait(0.7)
Door.CanCollide = true
Door.Transparency = 0
connection = Door.Touched:connect(onTouched)
function onTouched(hit)
connection = bin.Touched:connect(onTouched)
That is it. I am working on the "*_*-*_*-*"part. |