I followed alvin blox tutorial on team change gui but why this doesnt work?
Local script inside startergui:
local frame = script.Parent.Frame local remote = game.ReplicatedStorage.RemoteEvent frame.Deman.MouseButton1Click:Connect(function() remote:FireServer() end) script.Parent.TextButton.MouseButton1Click:Connect(function() script.Parent.TextButton:Destroy() frame.Visible = not frame.Visible end)
Listener Script:
local remote = game.ReplicatedStorage.RemoteEvent local teamcolor = BrickColor.new("Maroon") remote.OnServerEvent:Connect(function(player) player.TeamColor = teamcolor player:LoadCharacter() end)
Edit: post fix
Usually, changing teams won't show up on Studio but yes the team is applied to the player. I always encounter this when I was making my game, The Fun Mayhem.
First you need to get the Teams object to the DataModel (or the game root), then you can choose to create a team automatically via script or manually
You MUST put the team on the Teams object at the DataModel in order for teams to work!
Manually:
--// Assuming you have a team named Players with the color Maroon located at game.Teams. local playersTeamColor = BrickColor.new("Maroon") local remote = game.ReplicatedStorage.RemoteEvent remote.OnServerEvent:Connect(function(player) player.TeamColor = playersTeamColor player:LoadCharacter() end)
Automatically:
--// Create a team local playersTeam = Instance.new("Team") playersTeam.TeamColor = BrickColor.new("Maroon") playersTeam.Name = "Players" playersTeam.Parent = game.Teams local playersTeamColor = BrickColor.new("Maroon") remote.OnServerEvent:Connect(function(player) player.TeamColor = playersTeamColor player:LoadCharacter() end)