I was following a tutorial from Roblox and ran into a problem when I was trying to run the script even though I've followed the instructions to point. Here's what I got:
function LightOnFire(part)
print("Going to light this part on fire:")
print(part.Name)
fire = Instance.new("Fire")
fire.Parent = part
end
firePart = game.Workspace.Lava
firePart.Touched:connect(LightOnFire)
Anyone got any idea what the problem is?

8 comments
Is there anything showing up in the "Output"?
Nothing at all :/
Not even the "Going to light this part on fire:" ?
Oh, I have found my problem; I had another function above it for the changing of day, so I removed it and it began to work. Why is that?
Was that function a while loop?
Yeah
Okay. Well, that's why. Scripts are read from top to bottom, left to right, by Lua. So if there's a while true do or any type of never-ending loop, Lua will never execute anything after the loop. Lua won't execute any code out of order ever.
Oh, I see since it's a loop Lua can never move on to the next line. Thanks alot