Okay, so. I have got these teams:
-Alpha -Beta -Teta -Choosing (Made it AutoAssignable by using a script that when the player joins he gets teamed)
And I made a script to make them change group by being in a group. Here there's the code:
local Player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:Connect(function()
if Player:IsInGroup(---) then
local plr = game.Players.LocalPlayer.Name
Player.Character.Head:remove() --To refresh the player
game.Players[plr].TeamColor = BrickColor.new("Bright blue")
Player.PlayerGui.TeamChoose.Frame.Visible = false
else
Player.PlayerGui.TeamChoose.Frame.Main.Warning.Visible = true
wait(3)
Player.PlayerGui.TeamChoose.Frame.Main.Warning.Visible = false
end
end)
So, after doing it and dying. I still respawn in the first team I was in spawn location. What's wrong?
P.S. Yes, all spawn locations are set to neutral = false. And yes, They have got the right team color.
Please help!!!
