The players chats the spell name example : "Avada Kedavra"
it launches MainModule function (CreateSpell)
the CreateSpell function launches Touched function
Touched function:
function Touched(Spell,plr)
Spell.Touched:connect(function(Hit)
local HitHumanoid = Hit.Parent:findFirstChild("Humanoid")
if HitHumanoid and Hit.Parent.Name ~= plr.Name and Hit.Name ~= "Handle" then
if Spell.Name == "avada kedavra" then Spell:Destroy() HitHumanoid.Health = 0
CreateSpell function
function Spells.CreateSpell(Color,Name,plr)
local Ball = script.SpellPart:Clone()
Ball.Parent = workspace
Ball.Anchored = false
Ball.Name = Name
Ball.BrickColor = BrickColor.new(Color)
Ball.CFrame = Handle.CFrame * CFrame.new(0,1,-1)
game:GetService("Debris"):AddItem(Ball,10)
local Velocity = Instance.new("BodyVelocity")
Velocity.Parent = Ball
Velocity.velocity = ((plr.Character.Humanoid.TargetPoint - Ball.Position).unit) * 190
Touched(Ball,plr)
end
The problem is that the Part that should be removed after it touches player - stutters Here are some pictures of it
1.http://prnt.sc/d48lsc 2.http://prnt.sc/d48mnm 3.http://prnt.sc/d48m4b 4.http://prnt.sc/d48mvl
Is there a way to avoid it?

3 comments
If the links won't load just copy and paste them
Why not destroy the part even if it doesn't touch a humanoid? Sure, you won't have it bouncing off walls and such, but I think the problem here is that the part is going fast combined with the script going slow makes it so that by the time the script finishes the if statement, the part is past whatever it hit.
Well I think it is not possible here. Do you know any way to "speed up" the script?