local Door = script.Parent --Marks it to be Door as parent of part function onTouch(Brick) --Starts function, sends message to "Brick" that it was touched local Player = Brick.Parent:findFirstChild("Humanoid") --Makes it try to find Humanoid if(Player ~= nil) then --Makes sure it is a real Player if Player.Parent.Torso.roblox.Texture == "http://www.roblox.com/Black-Spade-Necklace-long-item?id=153111629" then --Should be the link to the VIP shirt but doesn't work and I die anyways... --PROBLEM IS HERE! Door.CanCollide = false --Door is no longer solid so VIP can pass through Door.Transparency = 1 --Door is completely Transparent Door.BrickColor = BrickColor.new(math.random(), math.random(), math.random()) --Changes color of door wait(1.5) --Waits 1 1/2 seconds Door.CanCollide = true Door is solid again Door.Transparency = 0 --Door is not transparent else Player.Health = 0 --Kills non-VIPs end end end Door.Touched:connect(onTouch)
local Door = script.Parent --Marks it to be Door as parent of part function onTouch(Brick) --Starts function, sends message to "Brick" that it was touched local Player = Brick.Parent:findFirstChild("Humanoid") --Makes it try to find Humanoid if(Player ~= nil) then --Makes sure it is a real Player if Player.Parent.Torso.roblox.Texture == "http://www.roblox.com/Spade-necklace-item?id=153111628" then --Should be the link to the VIP shirt but doesn't work and I die anyways... --PROBLEM IS HERE! Door.CanCollide = false --Door is no longer solid so VIP can pass through Door.Transparency = 1 --Door is completely Transparent Door.BrickColor = BrickColor.new(math.random(), math.random(), math.random()) --Changes color of door wait(1.5) --Waits 1 1/2 seconds Door.CanCollide = true Door is solid again Door.Transparency = 0 --Door is not transparent else Player.Health = 0 --Kills non-VIPs end end end Door.Touched:connect(onTouch)