Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Team choosing GUI not working for some odd reason?

Asked by 3 years ago

Script:

local player = script.Parent.Parent.Parent.Parent.Parent
script.Parent.MouseButton1Click:connect(function()
    player.Team = game.Teams:FindFirstChild("Boxers")
    player.Character.Humanoid.Health = 0
end)

the problem is mainly that when I click the button and the confirm button afterwards to confirm the team change, it doesn't change the team, just keeps it neutral. However, when the confirm text button is taken away and I change the player to equal script.Parent.Parent.Parent.Parent, it works. This is frustrating because I want a confirm button for the teams to work so that the player can see what the team characters look like before hand. Sorry if I made little sense, I'm happy to explain a little more what my problem is.

Answer this question