Help improving the accuracy of my projectiles

So when I fire my projectile it does seem to go to the exact mouse position it is always a little off. I’m using the mouse.hit.position to cast a ray that is 200 studs long to that position I then get the end position of the ray and tween a projectile to it.

local AvadaKedavraRemote = RemotesFolder.AvadaKedavra
AvadaKedavraRemote.OnServerEvent:Connect(function(Player, MousePos)
	local Spell = RepStorage["Particles/Effects"].AvadaKedavra:Clone()
	Spell.Parent = Player.Character.SpellDebris
	Spell.Name = "Avada Kedavra"
	Spell.Position = SpellCastPart.Position
	
	local EndPos = (MousePos - SpellCastPart.CFrame.p).Unit * 200
	local Ray = Ray.new(SpellCastPart.CFrame.p, EndPos)
	--local hit, position = game.Workspace:FindPartOnRay(Ray, Player.character)
	
	Spell.CFrame = CFrame.new(Spell.CFrame.p, MousePos) * CFrame.Angles(0,math.rad(92),0)
	
	local TweenInfo1 = TweenInfo.new(
		2,
		Enum.EasingStyle.Sine,
		Enum.EasingDirection.Out,
		0,
		false,
		0
	)
	
	local TweenGoals1 = {
		Position = EndPos;
	}
	
	local Tween1 = TweenService:Create(Spell, TweenInfo1, TweenGoals1)
	Tween1:Play()
	wait(5)
	Spell:Destroy()
end)

Try setting it’s CFrame here instead. It may be getting positioned above to avoid intersection.

Didn’t change anything, thanks for the reply.

local BodVel = Instance.new("BodyVelocity")
BodVel.Parent = bruh
BodVel.velocity = ((posOfMouse - bruh.Position).unit) * 100 -- bruh is my spell, ball

Also try tweening the cframe instead of the position.