Help with viewmodel

So I am using fe gun kit viewmodel right now, and I am getting really mad as it keeps doing this: Players.ToasterWaaffle.Backpack.USP.GunClient:3532: attempt to index nil with 'PrimaryPart

Code related: FakeCamera = Viewmodel.PrimaryPart:FindFirstChild("FakeCamera") --If "FakeCamera" Motor6D parents outside viewmodel's PrimaryPart (HumanoidRootPart), consider changing this

There is clearly a “FakeCamera” and “PrimaryPart” in the viewmodel:

I have tried everything such as deleting and adding parts to the code (Didn’t end up working so I just reverted it to it’s original state. I’ve also checked the name of the gun and viewmodel and they’re both the same name so that isn’t the problem. I’ve also tried looking for answers on why this happens, but got no answers.

check if your Model has a PrimaryPart. that may be why (Go inside properties, not the model itself)

1 Like

Great, thanks! I did that quickly right after you commented, and the error was gone! But due to the horrible updates that this gun kit has been getting (more confusing set up than what it was originally), i got another error!: Players.ToasterWaaffle.Backpack.USP.GunClient:3292: invalid argument #1 to 'pairs' (table expected, got nil)

But since I only asked for this error, thanks for the help and I’ll mark it as the solution.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.