What do you want to achieve? Keep it simple and clear!
-I’m aiming to make a script that changes a player’s team when they press a button from a GUI.
What is the issue? Include screenshots / videos if possible!
-When I test the script, the team does change, but the spawn point is still the same. Even though each team has a different spawn point.
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
-I tried looking it up but I didn’t find how to fix this exact situation that I’m having. Any help is appreciated.
My code for the Team Changing button:
--Changes Player's team after button click local plr = script.Parent.Parent.Parent.Parent.Parent.Parent.Name script.Parent.MouseButton1Click:Connect(function() game.Players[plr].TeamColor = BrickColor.new("Dark indigo") game.Workspace[plr].Humanoid.Health = 0 script.Parent.Parent.Parent.Parent.Enabled = false end)