So i’ve been making some scripts, so i made a Fire script. He puts fire in parts.
Theres the script:
local Model = game.Workspace.Structures2A
local Name = 'Part'
local colorone = Color3.new(1, 0.509804, 0.109804)
local colortwo = Color3.new(0.654902, 0.486275, 0.207843)
for i,v in pairs(Model:GetChildren()) do
wait(2)
if v.Name == Name then
local Fire = Instance.new("ParticleEmitter",v)
Fire.Texture = "http://www.roblox.com/asset/?id=258126401"
Fire.Color = ColorSequence.new(colorone,colortwo)
Fire.Rate = 62.5
Fire.Rotation = NumberRange.new(-180, 180) -- Fogo personalizado.
Fire.RotSpeed = NumberRange.new(-50, 50)
Fire.Acceleration = Vector3.new(0, 10, 0)
Fire.Lifetime = NumberRange.new(0.8)
Fire.LightEmission = 0.8
v.Material = Enum.Material.Neon
v.Color = Color3.fromRGB(173, 82, 8)
v.Dano.Disabled = false
wait(6)
Fire.Enabled = false
v.Color = Color3.fromRGB(0, 0, 0)
v.Material = Enum.Material.Grass
v.Dano.Disabled = true
end
end
i’m satisfied of the result, but i think can maybe have some improves.
Thank you <3
1 Like
Any pictures that I can see? So I can see how the fire looks now?
looks kinda bad.

theres how the bricks go when already burned:

1 Like
Just to make it easier, instead of typing out each individual property, you could just have a pat cycle emoter with all of the correct properties inside of ReplicatedStorage, and you could just clone it into the part.
Also, that fire looks amazing!!
Yeah the fire looks great. Not sure if theres anything you want to change for how the fire looks really.
hahahahaha i don’t fall for that.
And i will try that, really smart.
anyway, can i make several parts burn at once instead of one at a time?
So you use a for loop. The thing about for loops is that they wait until each iteration in the loop is completed before it moves on. You have to 2 options.
Option 1: loop through every part and enable the fire. Then wait 6 seconds, and in a second loop through the arch part again and this time disable the fire.
Option 2: use couroutines inside of the loop.
and how i can make that loop? can you make an exemple? obvious if you can.
I’m sorry I’m on mobile so I can’t type it. Basically, keep your script, just remove the wait(6) and the lines that disable the fire. Then add a wait(6) at the bottom of the script, below the loop. Then below the wait(6), just add another loop that loops through the models children and disabled the model’s particle emmiter.
Tomorrow i will try that, thank you for the help! :)’
------------------------
-----------------------
1 Like