Code:
for num = 1,50 do
print("Fire #" .. num .. " spawned")
local ClonedFire = EventObjects:WaitForChild("Fire"):Clone()
ClonedFire.Parent = workspace:WaitForChild("EventObjectStorage")
local X = math.random(-97,97)
local Z = math.random(-97,97)
ClonedFire:PivotTo(CFrame.new(Vector3.new(X,0.5,Z)))
if (ClonedFire.WorldPivot.Position - Vector3.new(0,0.5,0)).Magnitude < 12 then
local ChosenSize = math.random(5,18)
ClonedFire.WorldPivot.Position = ClonedFire.WorldPivot.Position * Vector3.new(0,15,15)
end
task.delay(10,function()
workspace:WaitForChild("EventObjectStorage"):ClearAllChildren()
end)
end
The line that is causing the issue is the one that multiplies the vector3