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.

3 comments
Why are you putting the teamcolor in quotation marks?
instead of player you can put in (function(player) and remove the local player or do game.Players.LocalPlayer
uhhh is your GUI in screen gui and u write local player try local Players that can work