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

How to set fire's Position?

Hey! I am making a game, and I am working on a part that needs fire. The only problem is when I do 'fire.Position = Vector3.new(x, y, z)' it says, Position is not a valid member of Fire "Workspace.Fire" This is the exact code:

script.Parent.ClickDetector.MouseClick:Connect(function()
	local fire = Instance.new("Fire",workspace)
	fire.Position = Vector3.new(35.901, 1.9, -35.233)
	local fire2 = Instance.new("Fire",workspace)
	fire2.Position = Vector3.new(35.901, 1.9, -32.433)
	wait(1)
	fire:Destroy()
	fire2:Destroy()
end)

Thanks in advance!

1 answer

✓ Accepted answer

Fire is an effect that is applied to any BasePart. As such, it does not have any Position property, that is controlled by the Part that it is in.

Place the fire inside of a Part, and control that part's position.

script.Parent.ClickDetector.MouseClick:Connect(function()
    local fire = Instance.new("Fire")
    local part = Instance.new("Part", workspace)
    fire.Parent = part
    part.Position = Vector3.new(35.901, 1.9, -35.233)
    local fire2 = Instance.new("Fire")
    local part2 = Instance.new("Part", workspace)
    fire2.Parent = part2
    part2.Position = Vector3.new(35.901, 1.9, -32.433)
    wait(1)
    part:Destroy()
    part2:Destroy()
end)

1 comment

0

Thanks!

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