Check if in group with IFELSE statement

Hello everyone!

I am making an tag system for my game, but now i want to know how i can give tags to group member from a certain group with a ifelse statement.
Is it possible? (Please submit a example, i don’t copy paste it into my script. Just wanna know how i can make it :slight_smile: )

if player:IsInGroup(groupId) then
    --set a tag, if dependent on the group role then with the GetRoleInGroup(groupId) method on player
end

would work quite well I guess

2 Likes

Thanks, it worked!

How can I look if someone is having a certain rank?

yep, the role detection code would be

local role = player:GetRoleInGroup(groupId)

which returns a string (text) role the player has on the group - but make sure the player IS in a group, otherwise it might break all the code

2 Likes

Thanks bro! I am a beginning scripter, this would help me out.

good luck then! oh, btw, you can just google stuff you need and do some research - there is an official website, RobloxDevHub, here it is

Yea i know, didn’t know how to call it. Xd

people need to learn to use google. You could ask it “How to get a players group roblox” and it gives you all the needed stuff