Anyone want to add a VIP door
#2
Try this script:
Quote:allowed = {"YourNameHere", "OtherNameHere"}

function in_table ( e, t )
for _,v in pairs(t) do
if (v==e) then return true end
end
return false
end

function onCollide(part)
if part.Parent:isA("Character") then
local name = part.Parent.Name
if in_table(name, allowed) then
if script.Parent.Collidable then
script.Parent.Collidable = false
script.Parent.Transparency = 0.5
sleep(1)
script.Parent.Collidable = true
script.Parent.Transparency = 0
end
end
end
end

link(script.Parent.Collided, onCollide)

It doesn't kill, but that would be easy to add if you wanted to.
Reply


Messages In This Thread
Anyone want to add a VIP door - by BuildistGuard - 01-15-2011, 06:32 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)