Default Roblox Fire Script

  1. What do you want to achieve? Keep it simple and clear!

I’m trying to make a script that makes a part on fire (the default roblox fire)

  1. What is the issue? Include screenshots / videos if possible!

The issue is that the script does not work. Here’s my script:

game.Workspace.Part = true

game.Workspace.Part.New.Fire = true

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

I’ve tried looking on google, and saw no script about the roblox default fire like the script.

Here’s how the default roblox fire looks on a part:

image

NOTE:

Sorry if I posted this in the wrong category, This is my first time posting in this category.

Also the part’s name is part and the code is in the part. The script type is a script.

2 Likes

If you’re trying to set a part on fire with a script, you need to create a part and put it into workspace. then you need to create a Fire instance and place it inside the part.

local part = Instance.new("Part") 
part.Parent = game.Workspace
local fire = Instance.new("Fire")
fire.Parent = part

When you do something like

game.Workspace.Part = true

you’re trying to set the “Part” property of workspace to true. However, the workspace does not have a “Part” property (see Workspace | Documentation - Roblox Creator Hub for the properties of workspace), so you will receive an error. The same logic applies to your second line; assuming there is a part in workspace, Part instances do not have a “New” property.

6 Likes

I will test that. Thank you for the help!

2 Likes

Try this:

workspace.Part.Fire.Enabled = true --Lights the fire
wait(5) -- Waits 5 seconds
workspace.Part.Fire.Enabled = false --Makes the fire stop burning
1 Like

I edited some part of the script but it did not work.

I’ve edited the script and changed the name of the part in the script to the part that I wish the fire to appear on. The script still did not work.

1 Like

Can you show me what error it showed in the output if there was an error?

2 Likes

I did not realize the script was inside the part. Try this:

local part = script.Parent --this is how you reference the part
local fire = Instance.new("Fire") --create the fire
fire.Parent = part --put the fire in the part
3 Likes

The error is: [21:29:45.730 - Fire is not a valid member of Part “Workspace.Part”]

The script worked, thank you for the help!