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.
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.