Tool not parenting to the Backpack

I’ve lost my marbles over this and descended into madness.

I printed the parent of the tool after parenting it to the backpack, yet it still doesn’t show in the toolbar in-game, I tried printing the tool to see if it was the correct object and it was. I literally have no idea how to fix this issue, is it a Roblox studio bug?

1 Like

Can you show me a picture of where the tool is in the explorer during testing?

Did you accidentally disable the backpack in one of your scripts?

Here

image

No, this is the only time I referenced the player’s backpack

Thanks and when run, like when you test the game, does the tool show up in backpack?

Nope. It isn’t in the backpack, but when I print it’s parent it says it’s in the backpack.

hmm I see the problem now, do you mind if you send the section of the script using the module?

It’s passing the player and gun object to the module

Where did you define self.Gun?

Why did you define self.Player in two functions?

the 2 screenshots i provided are in seperate modulescripts, i only defined self.Player once in each

Oh I see why, you’re moving the tool inside a metatable. So, the tool parent isn’t actually the backpack. It is the key named ‘backpack’ ([“backpack”] = tool).

the word ‘self’ indicates you’re moving it in a metatable, not actually the real world

so how would i go about making it so that its moved in the real world? i dont see any other way

well, just as an example, instead of using ‘self’ to move the tool, use the real game instance (in this case:)

function Manager:Init()
   local SvrStrg = --... you know!
   SvrStrg["Guns"]:FindFirstChild("FO Assault Gun").Parent = --[[<player>.Backpack]]--
end

You’ll have to find and retrieve the player. Debugging is up to you, good luck!

edit: I edited only your Manager:Init() function