I am making a team changer script which checks if you're in a group and then checks to see what rank you are, If you are the correct rank then the script continues.
However I can't seem to understand why this script isn't working. It is placed inside a GUI Text Button. Please help.
local player = script.Parent.Parent.Parent.Parent.Parent
local debounce = true
script.Parent.MouseButton1Click:Connect(function()
if player:IsInGroup(1230923) == 10 and debounce == true then
player.Team = game.Teams.Cabinet
debounce = false
player.Character.Humanoid.Health = 0
else
print("Not in group!")
wait(3)
debounce = true
end
end)
