I made this script in the projectile sent from a tool I made but when it hits something, it creates the explosion too early, and not where the explosion is supposed to happen
script.Parent.Touched:Connect(function(Hit)
if Hit.Parent == script.Parent.Caster.Value or Hit.Parent.Parent == script.Parent.Caster.Value then
return
end
local Blast = game:GetService("ServerStorage").Explosiont:Clone()
Blast.Parent = workspace.Spells
local Humanoid = Hit.Parent:FindFirstChildWhichIsA("Humanoid") or false
if Humanoid then
Humanoid:TakeDamage(20)
end
Blast.Position = script.Parent.Position
Blast.EnergyBallBlast.Position = Blast.Position
script.Parent:Destroy()
end)
I have figured it is not accurately getting the position of the ball when it is supposed to explode. It should explode as soon as it hits and the explosion should be right at the point of impact. Please help

2 comments
i see nothing wrong with ur script; perhaps when u fire the thing body parts of ur character are blocking the projectile?
no