So, this is part of a gun I have.
I have been getting 2 errors 1 client-Sided And 1 server-sided
Here are the errors: Client Error:
18:29:38.358 - attempt to multiply a Vector3 with an incompatible value type or nil; returning new zero-vector
And here is the server error:
18:29:41.330 - Players.Player1.Backpack.Net Gun.NetGunScript:10: bad argument #1 to '?' (Vector3 expected, got nil) 18:29:41.332 - Script 'Players.Player1.Backpack.Net Gun.NetGunScript', Line 10 - global drawbeam 18:29:41.334 - Script 'Players.Player1.Backpack.Net Gun.NetGunScript', Line 54 18:29:41.335 - Stack End
Here is line 10, and 54:
Line 10:
local dist = (beamstart-beamend).magnitude
Line 54:
drawbeam (fakestartpose, endpos, BrickColor.new("Grime"), .25)
And finally, here is the function where endpos is defined as: ( not the whole function )
event.OnServerEvent:connect(function(player, ...) local tuple = {...} -- if tuple[1] == "Fire" then local endpos = tuple[2]
If you need more information then please tell me, and kinda tell me what I should give ( Such as more below line 54, or more above it, etc.