RunService.Stepped:connect(function(U,Z)for U=#projectiles,1,-1 do local f=projectiles[U]local Q=UpdateProjectile(f,Z)if not Q then KillProjectile(f)elseif tick()-f.Start>f.Lifetime then KillProjectile(f)end end end)
-- main loop

RunService.Stepped:connect(function(_, deltaTime)
	for i = #projectiles, 1, -1 do
		local projectile = projectiles[i]
		local alive = UpdateProjectile(projectile, deltaTime)

		if not alive then
			KillProjectile(projectile)
		elseif tick() - projectile.Start > projectile.Lifetime then
			KillProjectile(projectile)
		end
	end
end)
