In my Roblox game I made a team change GUI and it works, in the Roblox Studio. When I publish it and play the game the GUI shows up but it wont change my team when I click it.
This is the exact script:
function Click(mouse)
script.Parent.Parent.Parent.Parent.Parent.TeamColor = BrickColor.new("Black")
script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health = 0
end
script.Parent.MouseButton1Click:connect(Click)

1 comment
Is this a LocalScript or script?