Hi, its the first time im posting here.

local Players = game:GetService("Players")
local frame = script.Parent
local CameraPlayer = game.Players.LocalPlayer

game:GetService("Teams").Ingame.PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function()
        if player.Name == CameraPlayer.Name then
            frame.Visible = false
            CameraPlayer.CameraMode = Enum.CameraMode.LockFirstPerson
            return
        end
    end)
end)

game:GetService("Teams").Lobby.PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function()
        if player.Name == CameraPlayer.Name then
            frame.Visible = true
            CameraPlayer.CameraMode = Enum.CameraMode.Classic
            return
        end
    end)
end)

so when the team is assigned the gui is not going visible / not visible this is made on a localscript i debugged a bit and all looks correct (know that camera player stuff are working)

4 comments

0

Manipulating GUIs require a localscript. Are you using it?

0

its written... 'this is made on a localscript'

0

Are you trying to set their team at the start of the game, or between rounds?

0

between rounds