I am trying to make a simple fire decay script, which will allow the user to 'destroy' certain blocks when they use a special tool to set them on fire, which is visualised by the object getting more transparent over time until it's completely invisible.
if script.Parent.Fire.Enabled then
for i=0, 1, 0.1 do
wait(0.5)
script.Parent.Transparency = "i"
end
if script.Parent.Transparency == 0 then
script.Parent:Destroy()
end
end
So far I have got this, which I thought would work, however in testing it only caught fire, and the transparency of the block would not change, I cannot see anything wrong with it, and I have tried to write the value for transparency in many different ways, such as in brackets and on its own.
EDIT:
while script.Parent.Fire.Enabled == true do
wait()
script.Parent.Light:Play()
script.Parent.Crackling:Play()
for i=0, 1, 0.1 do
wait(0.5)
script.Parent.Transparency = i
if script.Parent.Transparency == 0 then
script.Parent:Destroy()
script.Parent.Crackling:Stop()
end
end
end
I have changed the script a bit, and it still does not carry out any single one of these commands when the block's fire is enabled... help!

3 comments
I have tried this, and the block's transparency still doesn't seem to change at all :I
ok that should help
That did indeed help, thanks a lot!