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!

4 comments
This didn't work for some reason, even after I corrected the parent button's name (Derp, It changed from ChoseRebel to Rebel), any clue? No Error log either, strange...
What do you mean it doesn't work. The code running without errors means it works.
it didn't change my team
then click the button