I have a team change Gui that I dont want a team that is in prison to see so they cant get out using the gui although I ran into a wall because the script doesn't do anything at all.
No errors in output, the script is enabled, the gui
is enabled to begin with.
LocalScript located inside StarterPlayerScripts
local TeamService = game:GetService("Teams")
local Team = TeamService:FindFirstChild("Incarcerated")
local player = game.Players.LocalPlayer
local check = false
local gui = player.PlayerGui:WaitForChild("team change gui")
if player.Team == Team then
gui.Enabled = true
check = true
if check ~= true then
gui.Enabled = false
end
end
