Warden = game.Teams.Warden.TeamColor
Number = game.StarterGui["Change Team GUI"]["Switch Team"].Warden.Allowed
function Click(mouse)
if script.Parent.TeamColor ~= game.Teams.Warden.TeamColor then
script.Parent.TeamColor = game.Teams.Warden.TeamColor
Number.Value = Number.Value + 1
if Number.Value == 1 then
return nil
end
end
end
script.Parent.MouseButton1Click:connect(Click)
Hello, I was working on this script and trying to figure out a problem. I tried to assign a NumberValue, which is called "Allowed" on the number of players on a team but it doesn't seem to be working. So what do I do? I am really confused.
~Thank you for reading, Yeevivor4

2 comments
Well of course it's not going to work. It will probably error with the error "TeamColor is not a valid member of TextButton"
So.. What do I do to resolve this?