Yesterday, I created a post talking about this annoying error that I would get everytime a player would grab this boomerang item, and I found a solution to it, and the solution works only one time.
So when a player throws the boomerang on their first attempt, then grabs it back, there is no " attempt to index nil with ‘D’ ". Now, when a player attempts to throw the boomerang a second time, I get the same error that I got from yesterday.
Yes, it can be called in a ModuleScript. It seems like it is an issue with the BodyVelocity, BodyAngularVelocity and BodyPosition duplicating after the 2nd throw.
Its like it duplicates as much times as you throw, for example. If you thrown the boomerang a 2nd time, it duplicates 2 times since you’ve thrown it two times. If you throw the boomerang a 3rd time, it triples since you threw the boomerang three times.
That is pretty much the problem, and I can’t seem to figure it out.
What if I just add a BodyPosition and an AngularVelocity to the Boomerang when the player equips it? So we don’t have to always make a new instance once a player throws the boomerang.
Then once the player unequips the boomerang, I can just delete the boomerang and then everything is under control.
Your mention about there being a BodyPosition, helped me at least get kind of a solution, thank you man.
Btw, I have made a boomerang in the past, and it is working beautifully, than this. I wanted to code it where you press a key to throw the boomerang and it is just a mess, so ima just take notes from the old boomerang I constructed, I guess.