So im creating this simulator and i want to add a backpack/storage that is only obtainable by group members. The script im using however only works with tools. The backpack storage thing i want is an accessory and i wanted to know how i can modify this script to make it usable like that. Thanks
local groupId = 2783101
local tool = game.ServerStorage.TurtleShellBackpack
function onPlayerSpawned(player)
if player:IsInGroup(groupId) then
tool:Clone().Parent = player.Backpack
end
end
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function()
onPlayerSpawned(player)
end)
end)

5 comments
It worked thank you
If you accept it you can 1. Support my rep 2. Support your rep 3. Make it so that my answer stands out. Please do it
Since your question has been answered, you can accept this answer and move on. You have not yet, and therefore you do not earn anything.
this is sad but I got you, 3 upvotes, nice answer, I will probably use it in the future, I will accept it for you.
I upvoted too!