Team choose gui not changing teams

firstly create a remote event .
when the button is clicked fire the server and change the player’s team from there

You need a RemoteEvent, beside that, you will need ServerScriptService and tell the server that the player have choose the team.

1 Like

I dont know much about scripting since I satrted a month ago but what variable do I use to run the remove event?

this should help you

2 Likes
local p = script:FindFirstAncestorWhichIsA('Player')
local team = game:GetService('Teams').Raiders

script.Parent.MouseButton1Click:Connect(function()
p.Team = team
p.TeamColor = team.TeamColor

script.Parent.Parent.Parent.Enabled = false
p.Character.Humanoid.Health = 0
end)