just going to paste the important things:
`function SHOOT()
local DIRECTION = (MOUSE.Hit.Position - WEAPON_RAYCAST_START.Position).Unit * 10000
--[[rayparams ]]
local RAYCAST = workspace:Raycast(WEAPON_RAYCAST_START.Position, DIRECTION, RAY_PARAMETERS)
local RAY_RESULT
if RAYCAST then
RAY_RESULT = RAYCAST.Instance.Parent
end
local RAY_PLAYER
if RAY_RESULT and RAYCAST then
if RAY_RESULT:FindFirstChildOfClass("Humanoid") then
RAY_PLAYER = RAY_RESULT:FindFirstChildOfClass("Humanoid")
SHOOT_EVENT:FireServer(RAYCAST, RAY_RESULT, RAY_PLAYER)
end
end
print(RAY_RESULT)
end`
now, i have a rig for the gun to shoot at. And for the first few times i fire the event, the raycast returns the rig, but after a few shots it starts to always return workspace
yes, i have made the rayparams, normalized it and added *10000