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

VIP script not working?

Asked by 10 years ago
VIP = game.Workspace.VIP

TShirt = game.Workspace.TShirt
ID = TShirt.Graphic

function onTouched(hit)
    game.Workspace.Players:GetPlayers("Torso")
    game.Workspace.Players:GetPlayers("Humanoid")
    if Players.TShirt.ID "http://www.roblox.com/The-Games-VIP-T-shirt-item?id=154826128" == true then
        VIP.Transparency = 1
        VIP.CanCollide = false
        wait(2)
        VIP.Transparency = 0
        VIP.CanCollide = true
    else
        if Players.TShirt.ID "http://www.roblox.com/The-Games-VIP-T-shirt-item?id=154826128" == false then
            Players.Humanoid.Health = 0
        end
        end
    end

It's so like, if you have the T shirt, you have the VIP. If you don't you die if you try to go through it. No errors. Just not doing it. Why?

1 answer

Log in to vote
0
Answered by 10 years ago

On line 10, and 16, you have an error. The ID property is not a bool value, so true and false does nothing. Try replacing those with this:

 if Players.TShirt.ID == "URL Here" then

and if you want it false, you would use ~= , aka "Doesnt equal to"

>= -- Greater than or equal to
<= -- Less than or equal to
>/< -- Greater than / Less than
== -- Equal to
~= -- Doesn't equal to
Ad

Answer this question