Raycasting Not Working Right

so I’m making a gun system my problem is the raycast is messed up, when someone is standing still it will hit shots perfectly but when someone is moving the hitmarker shows, but the damage doesnt I have the localscript and the serverscript

1 Like

In line 60 of your code you wrote this:


You could try to add the .Unit that you’re missing, like so:

local raycastResult = workspace:Raycast(script.Parent.Handle.Position, (PlayerMouse.Hit.Position - 
script.Parent.Handle.Position).Unit*300,raycastParams)

Thank you man helps a lot sorry for the late response.

1 Like