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:
it’s supposed to work because other spring work exaclty like that
the code:
1 Like
which line specifically causes that error
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
do this:
if self.FireSpringShove == nil then
print("nil")
end
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)
Tidyen
(Tidyen)
September 18, 2022, 11:09pm
#8
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 .
antolol7350
(ZipperXYZ)
September 20, 2022, 12:44am
#10
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
antolol7350
(ZipperXYZ)
September 20, 2022, 12:47am
#11
also here is the new error : update is not a valid member of Model "Workspace.KRISS VECTOR_viewmodel"
antolol7350
(ZipperXYZ)
September 21, 2022, 12:20am
#12
i still can’t find why it’s doing that
well i found on how to do it thx yall for helping me