Better way to write this [Portion of while true do to "Play" once]

Is there a better way to write this. All my life, i have used this method if i only want a portion of the loop to play once, but i feel there is a better way to go around this. anyone have any suggestion

local FirstTime = true

while true do

	if FirstTime == true then
	       --Run code
		FirstTime = false
	end

end

the if condition and the code in it will play only once.
thank you all

function doStuff()
    --first time stuff here
     while true do
          ...
     end
end

doStuff() 

Why not that? Putting something in a loop that you only want to run once is against the entire purpose of a loop.