Earlier today I decided to go ahead and develop my Fort a bit more. Then while making my Team Gui script I came across an issue. It didn't work.
Player = game.Players.LocalPlayer TeamGui = Player.PlayerGui.TeamChange Xotac = TeamGui.XotacLegion Raiders = TeamGui.Raiders Xotac.MouseButton1Down:connect(function() Player.TeamColor = TeamColor.new("Cyan") Player.Character.Humanoid.Health = 0 end) Raiders.MouseButton1Down:connect(function() Player.TeamColor = TeamColor.new("Bright red") Player.Character.Humanoid.Health = 0 end)
Output:
17:41:28.477 - ServerScriptService.TeamScript:2: attempt to index global 'Player' (a nil value) 17:41:28.478 - Stack Begin 17:41:28.478 - Script 'ServerScriptService.TeamScript', Line 2 17:41:28.479 - Stack End 17:42:44.277 - Auto-Saving...
It looks to me like you're using LocalPlayer in a server-sided script, which will always return nil.
You can only use Game.Players.LocalPlayer in a LocalScript.