Client:203: attempt to index nil with 'aimSmooth'

Making a delay for the aim
Hi, I’m creating a fps game and I don’t understand why I have this bug that appeared when nothing is wrong

	if isAiming and framework.viewmodel ~= nil and framework.module.canAim and isRunning == false then
		local offset = framework.viewmodel.AimPart.CFrame:ToObjectSpace(framework.viewmodel.PrimaryPart.CFrame)
		aimCF = aimCF:Lerp(offset, framework.module.aimSmooth)
		currentSwayAMT = aimSwayAMT
	else
		local offset = CFrame.new()
		aimCF = aimCF:Lerp(offset, framework.module.aimSmooth)
		currentSwayAMT = aimSwayAMT
	end

Framework Module

and what is strange is that the bug suddenly stops and it works again

Record a video so I can see what’s wrong with you

I found a solution is that as soon as we join slot 1 it loads to avoid that the person has no weapon

If you find a solution, delete the topic

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