I'm making a script that when you click the button, the entire workspace collapses and catches fire, and explodes. this loop gets around halfway through, then it just stops.

	local waittrue = true --true or false
	local waitime = '0.001'
	local wow = game.Workspace:GetDescendants()
	for i,v in pairs(wow) do
		if v.ClassName == "Part" or v.ClassName == "UnionOperation"  or v.ClassName == "MeshPart"then
			if waittrue == true then
				wait(waitime)
			else
				warn("Server lag has dropped below 15 FPS at "..game.Workspace.DistributedGameTime)
			end
			local wow = game.ReplicatedStorage.Firey:Clone()
			wow.Parent = v
			wow.Fire.Parent = v
			wow.Fire2.Parent = v
			wow.Smoke.Parent = v
			wow:Destroy()
			v.Anchored = false
			local hi = Instance.new("Fire")
			hi.Parent = v
			hi.Heat = 25
			hi.Size = 30
			local bye = Instance.new("Explosion",v)
			bye. BlastPressure = 1000
			bye.BlastRadius = 100
			bye.DestroyJointRadiusPercent = 1
			bye.Position = Vector3.new(v.Position.X, v.Position.Y, v.Position.Z)
			bye.Visible = true
			local oo = Instance.new("Sound")
			local aa = Instance.new("DistortionSoundEffect")
			oo.Parent = v
			aa.Parent = oo
			oo.SoundId = "rbxassetid://5960565851"
			oo:Play()
			oo.Volume = 0.01
			oo.Playing = true
			oo.PlayOnRemove = true
		end
		game.Workspace.Gravity = game.Workspace.Gravity*1.5
	end

Thanks!

6 comments

0

Is your wait time working? Wait time SHOULD only accept numbers as parameters. Plus my understanding was the minimum wait is .07(roughly) seconds.

0

Yes, waittime has always worked.

0

The documentation says if a wait isnt provided .03 seconds is assumed, it doesnt mention incorrect parameters being given, iE a string.

0

Issue still happens

0

Not sure if its your issue but you defined wow twice, once as a table of descendants, and the other as a part clone.

0

Are there any errors or warnings in the output?