Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why Does the VIP shirt not work?

Asked by 10 years ago
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

Log in to vote
1
Answered by 10 years ago
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)
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 DevScripting 92 — 10y
0
Lol 1 digit off... BritishGotSwag 30 — 10y
Ad

Answer this question