Cannot find GunFirePoint in ViewModel and weapon | thienbao2109's FE Gun Kit

I’ve encountered a bug in thienbao’s FE Gun Kit, where GunFirePoint1 isn’t found by the GunClient. But the bug is SO weird, it only appears on not all weapons, bug can appear in the Viewmodel or the actual weapon(more often).

The error:

The line of code where it happens:

local cframe = (Camera.Focus.p - Camera.CoordinateFrame.p).Magnitude <= 1 and CFrame.new(VMHandleToFire:FindFirstChild("GunFirePoint"..CurrentFireMode).WorldPosition--[[here]], Position) or CFrame.new(HandleToFire:FindFirstChild("GunFirePoint"..CurrentFireMode).WorldPosition--[[here]], Position)

I’ll be very glad for any help! Or if you know some other kits development of which supported by this moment, that’ll be even more helpful!:pray::pray::pray:

How are you expecting to fix the problem with jsut 1 line of code that doesnt really reffer yo anything also who places the console on the right side?

So I looked over the code and I saw this

...irstChild("GunFirePoint"..CurrentFireMode).Worl...

Basically, it’s not looking for GunFirePoint, but GunFirePoint followed by the current fire mode. Here’s an example of what this could return

local cfm = "Sigma"
print("GunFirePoint"..cfm) -- prints "GunFirePointSigma"

Perhaps VMHandleToFire doesn’t contain “GunFirePoint”, but “GunFirePointCool” or “GunFirePointZoom” etc etc etc
One possible cause for this is CurrentFireMode being set to nil. This would make it try to find a child in VMHandleToFire called “GunFirePoint” despite it not existing
I don’t have thienbao2109’s FE Gun Kit but if I have time later today I’ll check it out

1 Like

you need to use an attachment with the desired name, i put my ones in the handle

1 Like

ah ok
as I said I’ll try an replicate=>fix it later today

1 Like

It exists in the spot it checks, and the names of the attachment and prompt for searching are 1 to 1. I actually found a pretty rough fix to this: just put in the line above

task.wait(0.05)

That worked for me, but that fix is awful. Can I fix this some other way?

Edit: it’s depended on the render speed, so if the model of the gun is not too optimized, it’ll make that error happen :frowning:

if it works, it works. you don’t need to stress over a solution that works perfectly fine

1 Like

Well, you’re right. It’s going to be a bit harder to balance weapons, but I have no choice for now.