I am building team system, so there is a group team and a guest team, If the player is not in the group, I want the Group team overlay to be visible as well(So it is blocking the button for the group team) as well as a message, here's the script I have tried:
game.Players.PlayerAdded:Connect(function(player)
local GroupID = 5572227
if not player:IsInGroup(GroupID) then
script.Parent.BackgroundTransparency = 0.9
script.Parent.TextTransparency = 0.4
game.StarterGui.TeamGui.Warriors.MayNotJoinTeam.Visible = true
game.StarterGui.TeamGui.Warriors.CannotJoin.Visible = true
end
end)
How do I make the script work?

4 comments
Have you tried if player:IsInGroup(GroupID) == false then instead?
No. Not yet.
It doesn't work still when I tried that.
This works for me, I gave an answer, though.