so i have a bunch of tools and im cloning and parenting it to the players backpack when the player joins the game. When i print the parent of the tool it prints the correct parent but, when i try to find it in the explorer its not there and it doesnt appear in the player’s backpack. Ive checked on the server aswell and it doesnt appear there either. Ive also tried waiting for character to be added before parenting the tool but the same problem was still present.
PlayerItemInfo[player]["ToolName"] = data["ToolName"]
local Tool = game.ReplicatedStorage["Lifting Objects"][PlayerItemInfo[player]["ToolName"]]:Clone()
Tool.Parent = player.Backpack
July 25, 2020, 3:23am
Unequipped tools are stored in the player’s
backpack, but when equipped are moved to the player’s character. Are you sure you are looking for the tool in the correct spot?
The tools are stored in Replicated storage, Cloned then parented to the players backpack. I am fairly certain this doesn’t have anything to do with the tool being equipped / unequipped.
July 25, 2020, 3:26am
So you’re saying that when you print the tool’s parent you get the player’s backpack, but you can’t find it by manually looking in the game explorer?
Yes sir, its not there in neither the server or the client
July 25, 2020, 3:27am
So just to make sure, you have found the player’s backpack in the explorer, but no tools are inside?
Yes, i have checked the player’s backpack in explorer and it is completely empty.
July 25, 2020, 3:29am
Does the player actually receive the tool?
No, the player does not receive the tool
July 25, 2020, 3:30am
Have you got any errors in your output?
None at all, its all just my print statements
Try it to this and see if it changes anything. It might need the parentheses to help it figure that jumble of brackets out.
local Tool = game.ReplicatedStorage["Lifting Objects"][(PlayerItemInfo[player]["ToolName"])]:Clone()
Also, try printing “Tool”, and see if you are actually referencing what you want.
Sure i will try that now! i have tried printing tool and it is printing the correct thing.
July 25, 2020, 3:34am
What type of script are you using?
I just tried adding the parentheses, The problem is sadly still present
I am using a server script to clone and parent the tools to the player’s backpack.
July 25, 2020, 3:37am
Try setting the parent to the player’s character (player.Character) and see if that works.
This works, i still do find it quite weird tho that when i tried doing it the other way it prints the correct parent.
July 25, 2020, 3:49am
I’m not actually sure why that happens but if you’re fine with it auto-equipping then that method should be fine.
Ye thanks a lot
you have put my mind at ease