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

How can i make this only visible to the team i picked?

Asked by 6 years ago
Edited 6 years ago

Ok so, i have to make a script where only one team can press the spectate button, can anyone help?


local player = game.Players.LocalPlayer local team = player.TeamColor while wait() do if team == BrickColor.new("Fossil") then player.PlayerGui:WaitForChild("SpectateGui").Button.Visible = true else if team == BrickColor.new("Alder") then player.PlayerGui:WaitForChild("SpectateGui").Button.Visible = true end end
0
You realize that you're making the button visible for both teams, right? You have it set to true for both teams. Crazycat4360 115 — 6y
0
I'd also use player.Changed instead of while wait() do. It might help to reduce lag. Crazycat4360 115 — 6y
0
oof yeah bro, thnks SniderYonduro 2 — 6y

Answer this question