Gun fire spring module viewmodel problem

Hello, to make it simple I’m making an fps gun engine and I don’t want to make the fire animation myself.

I’m using a string module to make the ViewModel shoot effect

but somewhy I keep having this error:
image

it’s supposed to work because other spring work exaclty like that

the code:

image

1 Like

which line specifically causes that error

image

this one

then self.FireSpringShove is nil, try checking if that line of code is ran before it’s created, or check if it’s spelled right

I tried doing like on the bottom add an if statement but nothing happened when I did

image

do this:

if self.FireSpringShove == nil then
   print("nil")
end

image

yea I tried to shoot and I think the value is not changing it’s probably why

thought i have no idea of how to fix it ( also i gtg eat sorry)

Is this done on OOP? If so, replace the module.Fire function with:

function module:Fire(Viewmodel, GunName, FireSpring)
	local fireVector3 = Vector3.new(0, 5, 10)
	self.FireSpringShove = FireSpring:shove(fireVector3)
end

um I’m not really sure whats the difference with : and a .

Hello I just want to say that I changed my whole script to be OOP oriented and that I learned about it and it’s still not working somewhy

also here is the new error : update is not a valid member of Model "Workspace.KRISS VECTOR_viewmodel"

i still can’t find why it’s doing that

well i found on how to do it thx yall for helping me