Hello. I am making a Q&A place for WaveStudios.
I want to make it to where the "ask a question" button only works if the group owner or co-owner is in the server.
This is what I have so far:
script.Parent.MouseEnter:connect(function() if ?? then -- At "??" put where it can look for the group owner/co-owner -- Ignore, I already have this set up here end end)
(The group ID is 1229606 and the user levels are: [Owner: 255][Co-Owner: 254])
You can use the GetRankInGroup method of Player
to find their rank in a particular group.
If you want to tell if anyone in the game has a certain rank, iterate through each player:
local player=game.Players.LocalPlayer local found=false for _,v in pairs(game.Players:GetPlayers())do if v~=player and v:GetRankInGroup(1229606)>=254 then found=true break end end