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

Check if groupID exists or is nil?

Asked by 4 years ago

Is it possible to detect if a group ID is valid or nil?

1 answer

Log in to vote
0
Answered by
ImTrev 344 Moderation Voter
4 years ago
Edited 4 years ago

Yes, hopefully this helps!

local GS = game:GetService("GroupService")

local s,f = pcall(function()
    isGroup = GS:GetGroupInfoAsync( random group number )
end)
    if s then
        print('group is found!!!')
    end

Ad

Answer this question