local tweenservice = game:GetService("TweenService")
script.Parent.OnServerEvent:Connect(function(plr)
local fireball = game.ReplicatedStorage.fireball.Part:Clone()
fireball.Parent = workspace
game.Debris:AddItem(fireball,3)
fireball.CFrame = plr.Character.HumanoidRootPart.CFrame + plr.Character.HumanoidRootPart.CFrame.lookVector * 4
tweenservice:Create(fireball,TweenInfo.new(3,0,0),{CFrame = plr.Character.HumanoidRootPart.CFrame + plr.Character.HumanoidRootPart.CFrame.lookVector * 350,Transparency = 1},Enum.EasingStyle.Quint,Enum.EasingDirection.Out):Play()
local alreadytouched = false
local fireparticle = game.ReplicatedStorage.fireball.Par:Clone()
fireparticle.Parent = plr.Character.Torso
game.Debris:AddItem(fireparticle,3)
fireball.Touched:Connect(function(hit)
if alreadytouched == true then return end
if hit.Parent.Name == plr.Name then return end
if hit.Parent:FindFirstChild("Humanoid") then
for i = 1,#workspace:GetChildren() do
if workspace:GetChildren()[i]:IsA("Part") or workspace:GetChildren()[i]:IsA("MeshPart") then
hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - 20
plr.Character.HumanoidRootPart.CFrame = fireball.CFrame
fireball:Destroy()
wait(0.5)
fireparticle:Destroy()
end
for i = 1,1 do
hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - 0
wait(1)
end
end
end
end)
wait(2.3)
alreadytouched = true
end)
so basically i want it so when the fireball hits any parts in workspace u teleport to the fire ball i tried using the for i ... and it doesnt work and it doesnt give a error either

2 comments
it seems that i was retarded thank you
Haha, you're welcome :)