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

Why wont this script work?

Asked by 10 years ago

So recently my GUI remover script broke.. So im trying to redu it but its not working Properly.
Its suppose to remove the Change Team GUI When your in Prison (Bright violet) Please tell me what I did wrong And correct it.

if game.Players.LocalPlayer.TeamColor == BrickColor.new("Bright violet") then
game.Players.LocalPlayer.PlayerGui["Team Changer"]:remove()
end 

1 answer

Log in to vote
1
Answered by 10 years ago

What you have here is a script that will run once, what you need is something that constantly checks the players team using a while wait() do loop. The script should be something like this:

while wait() do
    if game.Players.LocalPlayer.TeamColor == BrickColor.new("Bright violet") then
        game.Players.LocalPlayer.PlayerGui["Team Changer"]:remove()
    end
end

If this is checking for local player make sure it's in a local script inside the player's PlayerGui.

0
Alright Thank you! MicrobeBlox 5 — 10y
Ad

Answer this question