Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How could I make it do this?

I have a burning fire script and you can see it below, but I want it to burn a brick after 1 second of that brick being burnt another starts with the previous one still going. Is there any way to do this? Here is my script below:

for i,v in pairs(script.Parent:GetChildren()) do
	if v.ClassName == "Part" or v.ClassName == "WedgePart" or v.ClassName == "CornerWedgePart" or v.ClassName == "TrussPart" or v.ClassName == "Seat" or v.ClassName == "VehicleSeat" or v.ClassName == "SkateboardPlatform" or v.ClassName == "UnionOperation" or v.ClassName == "NegateOperation" then
		fire = v:FindFirstChild("Fire")
		if fire == nil then
			f = Instance.new("Fire",v)
			f.Color = Color3.new(255,128,0)
			f.SecondaryColor = Color3.new(255,0,0)
			f.Enabled = true
			f.Heat = 15
			f.Size = 20
			wait(2)
			v.BrickColor = BrickColor.new("Reddish brown")
			v.Material = "CorrodedMetal"
			wait(3)
			v.BrickColor = BrickColor.new("Black")
			wait(5)
			repeat wait(0.1) f.Size = f.Size - 1 until f.Size == 2
			v.Anchored = false
		else
			fire.Color = Color3.new(255,128,0)
			fire.SecondaryColor = Color3.new(255,0,0)
			fire.Enabled = true
			fire.Heat = 15
			fire.Size = 20
			wait(2)
			v.BrickColor = BrickColor.new("Reddish brown")
			v.Material = "CorrodedMetal"
			wait(3)
			v.BrickColor = BrickColor.new("Black")
			wait(5)
			repeat wait(0.1) fire.Size = fire.Size - 1 until fire.Size == 2
			v.Anchored = false
		end
		if v ~= nil then
			wait(5)
			v:remove()
		end
	end
end

4 comments

2

Is BasePart a valid instance?

1

I just see it in other scripts, I just put it there to be sure if there is a 'BasePart' it burns aswell, but the script works with it...

2

Also: BasePart is mainly used for the IsA() method, because although an Instance's ClassName will never be 'BasePart', If you do instance:IsA("BasePart") then it will return true no matter if the instance is a part, wedge, or corner wedge.

0

I added more part names, does anyone have any way to do what I asked or not?

1 answer

✓ Accepted answer

You're using Size incorrectly on line 31. Size is a Vector3 value because it has height, width, and depth. However, you're treating it like a number value. Try this:

repeat wait(0.1) f.Size = f.Size - Vector3.new(1,1,1) until f.Size <= Vector3.new(2,2,2) --I used less than or equal to just in case it doesn't equal 2,2,2 EXACTLY, it still should work. 

1 comment

1

f is the fire, not a brick however it's meant to be fire not f, fixed it now but not what I was asking for!

This discussion is preserved as it was. New answers, comments, and votes are closed.