Having a problem changing a players team through a teamgui every part of the code goes through from start to end, but the team doesn't change
tried doing it in 2 ways 1. sending a remotevent from the client upon clickong to the server 2. from clientside without server just for the purpose of seeing if the team change works at all, but nothing worked
client
for i,v in pairs(TeamGui:GetChildren()) do
v.MouseButton1Click:Connect(function()
PlayerTeamChangeRemoteEvent:FireServer(v.Name)
end)
end
server
PlayerTeamChangeRemoteEvent.OnServerEvent:Connect(function(player,button_name)
game.Players[tostring(player)].Team = game.Teams[button_name]
end)
** You are now Level 4! **