Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why Does the VIP shirt not work?

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)

1 answer

✓ Accepted answer
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)

2 comments

0

When you make vip shirt the asset id is always -1 then it is yours was this:http://www.roblox.com/Black-Spade-Necklace-long-item?id=153111629 mine was this: http://www.roblox.com/Spade-necklace-item?id=153111628

0

Lol 1 digit off...

This discussion is preserved as it was. New answers, comments, and votes are closed.