Box not going where the mouse is pointing

so i have a throwing system, and the box is going slightly to the sides, i think it is because the mouse hit position is on the box
(mouse is mouse.Hit.Position)

	local box = target
	local speed = -100
	box.CFrame = CFrame.new(box.Position, mouse)
	box.Velocity = box.CFrame.LookVector * speed
1 Like

I don’t know the context for your throwing system but I would try Mouse.UnitRay

is there a way to just get the direction of the mouse?
(also what context do you need?)

u should be looping it the cframe and velocity. as well you should do this instead.

box.CFrame = CFrame.new(box.Position, mouse.Position)

the mouse is already mouse.Hit.Position

If you save these properties as variables, they will not change as it will only hold the first value assigned to it unless changed. I also recommend using user input service for things that have to do with mouse, as the player get mouse method is deprecated.

link to the game:

(E to pick it up and click to throw it)