local teamname = "(Captain)" local button = script.Parent local player = script.Parent.Parent.Parent.Parent.Parent local gui = script.Parent.Parent.Parent button.MouseButton1Click:connect(function() player.TeamColor = BrickColor.new "(Really black)" player.Character.Huminoid.Health = 0 gui.Enabled = false gui.ResetOnSpawn = false end)
Clicking does absolutely nothing.
You were putting the quote marks and parentheses in the wrong order for the local teamname and player.TeamColor. Here is the fix.
local teamname = "Captain" local button = script.Parent local player = script.Parent.Parent.Parent.Parent.Parent local gui = script.Parent.Parent.Parent button.MouseButton1Click:connect(function() player.TeamColor = BrickColor.new("Really black") player.Character.Huminoid.Health = 0 gui.Enabled = false gui.ResetOnSpawn = false end)
You spelled "Humanoid" wrong on line 9 and you were incorrectly giving the Color3 Value that the player should be assigned to.
local button = script.Parent local gui = script.Parent.Parent.Parent local player = script.Parent.Parent.Parent.Parent.Parent local teamname = "Captain" button.MouseButton1Click:Connect(function() player.TeamColor = BrickColor.new("Really black") player.Character:FindFirstChild("Humanoid").Health = 0 gui.Enabled = false gui.ResetOnSpawn = false end)