I am working on a game where I have a team change GUI, but for some reason I can't click on it. I put the script in a Script, not a LocalScript. I want it so I can click on the button, and then it changes my team, then resets me so I can go to my teams spawnpoint.
local Player = script.Parent.Parent.Parent
function onClick()
Player.TeamColor = BrickColor.new("Bright Blue")
Player.Character.Humanoid.Health = 0
script.Parent.Parent.Parent:Destroy()
end
script.Parent.MouseButton1Click:connect(onClick)

3 comments
Is this in a TextButton
Use a textbutton
Yeah. It is.