What do you want to achieve? Keep it simple and clear!
So i need to assign by button player in team.
What is the issue? Include screenshots / videos if possible!
I used client one and it create a lot of glitches, but now i don’t have idea how to write it
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
used local script.
local BlueTeam = game.Teams.BLUE
local Players = game.Players
local Button = script.Parent
local Gui = script.Parent.Parent.Parent
Button.MouseButton1Click:Connect(function(Player)
Player.Team = BlueTeam
Gui.Enabled = false
end)
Normal scripts don’t run in GUIs so change the script to a local script. Also you are going to need to use remote events to make the player change teams on the server not just on the client