cskyro
(kyro)
April 6, 2023, 8:55pm
1
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?
cskyro
(kyro)
April 6, 2023, 9:03pm
5
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?
cskyro
(kyro)
April 6, 2023, 9:05pm
7
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?
cskyro
(kyro)
April 6, 2023, 9:08pm
9
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?
cskyro
(kyro)
April 6, 2023, 9:17pm
13
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
cskyro
(kyro)
April 6, 2023, 9:50pm
16
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