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

How can I make it so that this "Script" runs every time a player changes his team with an admin?

Asked by 5 years ago

So this only works 1 time. And that is when a player joins but I want to make it so that when a player changes his/hers team to the teamcolor "Earth green" with a admin then this script should be activated

game.Players.PlayerAdded:Connect(function(player)
    player.Changed:Connect(function(property)
        if property == "TeamColor" then
            if player.TeamColor == BrickColor.new("Earth green") then
            player.PlayerGui:WaitForChild("ScreenGui").Spawn.Disable.Visible = true
            end
        end
    end)
end)

This is a server script. I may suck at explaining but I atleast tried

0
Ew, do not have the server modify GUI. User#19524 175 — 5y
0
Well, got any idea on what I should do atleast? WillBe_Stoped 71 — 5y
0
@WillBe_Stopped Make a RemoteEvent in ReplicatedStorage and use it. From the client (OnClientEvent) modify the GUI and from server FireClient Axdrei 107 — 5y
0
I made a new post! um I decided to scrap this idea my other one is chatted event WillBe_Stoped 71 — 5y

Answer this question