Projectile doesn't go in a straight direction and just dangling while being pushed

heres the script:

			local slash = RS:WaitForChild("Assets"):WaitForChild("slash"):Clone()
			local root = char.HumanoidRootPart
			local rootcframe = root.CFrame
			
			root.Anchored = true
			root.CFrame = CFrame.new(root.Position,Vector3.new(mouse.X,mouse.Y,mouse.Z))
			
			slash.Parent = workspace.VFX
			slash.CFrame = root.CFrame
			
			local attachment = Instance.new("Attachment",slash)
			
			local V = Instance.new("LinearVelocity",slash)
			V.MaxForce = math.huge
			V.VectorVelocity = root.CFrame.LookVector * 100
			V.Attachment0 = attachment
			
			slash:SetNetworkOwner(plr)
			
			Debris:AddItem(slash,2)
			
			task.wait(1)
			root.Anchored = false

Video:

Maybe instead of setting linear velocity onto the projectile you could possibly use the BodyVelocity object because you can control how much force it applies which could possibly prevent the projectile from bounding or moving unpredictably. Another solution would be having the spell spawn a bit in front of the caster which would also possibly prevent bouncing since it is caused by collision with the user. You can approach this by offsetting the position of the spell via X,Y,Z directions.

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