Raycast being in accurate

I don’t think you can use the Camera’s CFrame to do the ray casting like that instead you need to either use the ScreenPointToRay or ViewportPointToRay, the only difference being the latter not accounting for gui inset. This is how you would use it:

local Mouse = player:GetMouse()
BulletRay = Camera:ScreenPointToRay(Mouse.X, Mouse.Y, RayDistance)
1 Like