Raycast is funky and not accurate?

Its supposed to be going to the mouse hit but its not
andd idk how to fix it

2024-05-26 18-58-12.wmv (2.8 MB)
– a bit laggy cuz of my laptop

is there a problem with the raycast thats making the aim off?

	local hookDestination = mouse.Hit.Position

	local ray = Ray.new(ODM.CFrame.Position, (hookDestination - ODM.CFrame.Position).Unit*maxDistance)
	local touch,position = workspace:FindPartOnRay(ray, player.Character, nil, true)

image

this doesn’t contribute anything but i suggest you use Convert to 8MB or just upload the mp4

1 Like

workspace:FindPartOnRay() is deprecated, you should use workspace:Raycast() instead.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.