Tool Scripts referencing players backpack when equipped

Hello,

So I’ve recently come across an issue when trying to code a brand new tool. The issue is that when the player equips the tool, the scripts within the code don’t seem to update their location. Here is the issue.

So, I have been trying to get the players blade part for a sword. I have tried the following variable:

local Blade = script.Parent.Parent.Models.Blade.Blade

This always goes back as if the tool was originally in the players backpack. I have tried multiple things as changing the blade variable when an event is called when they press q to extend their blade. But again, it still reverts to the players backpack, even though the tool is equipped and a child to the characters model.

I have also tried:

Character:FindFirstChild()
Character:FindFirstChildOfClass()
Character:FindFirstAncestor()

And these haven’t worked. They still try go to into the players backpack, hence giving the blade nil as its no in there.

Though, if I put the tool on a old studio, it works. I have made this system from a new baseplate yesterday and I am getting this issue.

Any help or advice would be really appreciated.

1 Like

Are you trying to reference the player within a tool?

1 Like

I have found the solution. The fix was I had to use an old game to make it work… I don’t know why its like this for newly created studios.