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)
Try:
local groupId = 2783101 local tool = game.ServerStorage.TurtleShellBackpack function onPlayerSpawned(player) if player:IsInGroup(groupId) then tool:Clone().Parent = player.Character -- changed from player.Backpack end end game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function() onPlayerSpawned(player) end) end)
This will ensure it goes on the character