local vipmembers = {"Roboy5857", "tyresse"} vip = game.Workspace.VIPDoor function onTouched(vip) if vipmembers:onTouched(vip) then vip.Transparency = 1 vip.CanCollide = false wait(2) vip.Transparency = 0 vip.CanCollide = true end end script.Parent.Touched:connect(onTouched)
When I go online.. it doesn't work. Why?
Put this script in the door.
VIP_Members = {"Roboy5857", "tyresse"} door = script.Parent door.Touched:connect(function(hit) if hit.Parent and hit.Parent:findFirstChild("Humanoid") and game.Players:GetPlayerFromCharacter(hit.Parent) then p = game.Players:GetPlayerFromCharacter(hit.Parent) for i,v in pairs(VIP_Members) do if p.Name == v then door.Transparency = 0.7 door.CanCollide = false wait(0.5) door.Transparency = 0 door.CanCollide = true end end end end)
~ Thank me by accepting this answer/bumping up my reputation.