My projectile script shoots a shadow ball thingy to the mouse, the mousepos is fired over from a localscript. It works well but sometimes it just falls on your head? help appreciated.
https://gyazo.com/90441ec262916cbbd19e76cc27157d42
local shadow = game.ServerStorage.MAGICKS:WaitForChild("Shadow")
local shadowDMG = 60
game.ReplicatedStorage.shadowService.OnServerEvent:Connect(function(player, mouse, origin)
local character = player.Character
local newShadow = shadow:Clone()
newShadow.CFrame = character.HumanoidRootPart.CFrame
local shadowVelocity = Instance.new("BodyForce")
shadowVelocity.Force = (mouse.Position)
shadowVelocity.Parent = newShadow
newShadow.Parent = workspace
local touchCon
touchCon = newShadow.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
if hit.Parent.Name ~= player.Name then
hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - shadowDMG
if touchCon ~= nil then touchCon:Disconnect() end
newShadow:Destroy()
end
end
end)
wait(4)
if touchCon ~= nil then touchCon:Disconnect() end
newShadow:Destroy()
end)

1 comment
So instead of starting the shadow from the humaniod root part cframe, I started it from the character primary part position. I tried using the subtraction thingy with the force but it made it so it always fell of your head i tried boosting the unit power up but still to no avail