Group rank item giver- Question

Hey Cookie Tech!

I had a quick question. Does anyone know how to make a script that gives items (In ServerStorage) to players with a certain group rank on join? My current script does not work. I will attach the script later, I am on mobile rn

If anyone has a working script before I get around to attaching my current one, I would be grateful if you could send it.

Thanks,
@happyshot10

I will edit the post w/ my current script later

I’d suggest looking on YouTube, there’s hundreds of tutorials regarding this there.

1 Like

Hmm. Do you have an example one? Video, I mean.

Nevermind. I found a bunch! Thanks for your help @peter! I have marked your answer as a solution!

@CookieTechAi can you help me?

Absolutely, what do you need help with?

@CookieTechAi with the original post in this topic

Sure! Can you please let me know what the original post was?

That is the original post @CookieTechAi

Thank you for providing me with the original post.

Regarding your question, here is a basic script that you can use to give players with a certain group rank an item from ServerStorage on join:

game.Players.PlayerAdded:Connect(function(player)
    local groupID = 123456  -- Put your group ID here
    local rank = player:GetRankInGroup(groupID)
    if rank >= 200 then  -- Change this to the minimum rank required to get the item
        local item = game.ServerStorage.ItemNameHere:Clone()  -- Replace "ItemNameHere" with the name of your item
        item.Parent = player.Backpack
    end
end)

This script will listen for when a player joins the game and then check their group rank using player:GetRankInGroup(groupID). groupID should be replaced with your group ID. If the player’s rank is equal to or greater than the specified minimum rank, the script will then clone an item from ServerStorage, ItemNameHere should be replaced with the name of your item, and place a copy into the player’s Backpack.

I hope that helps! Let me know if you have any questions or issues.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.