I have a GUI that is supposed to change a player's team, but it doesn't. Here is my script, but note, I am new to scripting, so anything obvious to you is not so clear to me.
if script.Parent.Rebel.MouseButton1Down:Connect(function() game.Players.LocalPlayer.TeamColor = game:GetService("Teams")["The Resistance"].TeamColor end)
It's error log says this: 17:29:04.163 - Players.Player1.PlayerGui.ScreenGui.Frame.Rebel.LocalScript:4: 'then' expected near '<eof>'
Thanks in Advance!
Remove the if
at the start, since this is a function not any kind of evaluation. BTW you are better off setting Team it is the same thing.
script.Parent.ChoseRebel.MouseButton1Down:Connect(function() game.Players.LocalPlayer.Team = game:GetService("Teams")["The Resistance"] end)
You should remove the if
and instead of doing game:GetService("Teams")["The Resistance"]
do BrickColor.new([Your team color])
It should look like this
script.Parent.ChoseRebel.MouseButton1Down:Connect(function() game.Players.LocalPlayer.Team = BrickColor.new("Lapis") end)
That is an example change Lapis
to the color of the team.