Getting Started Coding Floating Combat Text

elapsed is a parameter that is passed to the OnUpdate script handler by the game (see the SetScript line). It signifies the time elapsed since that frame was last updated (refreshed).

The lines:

self.UpdateSpeed = self.UpdateSpeed - elapsed
	if self.UpdateSpeed > 0 then
		return
	end
	self.UpdateSpeed = UpdateSpeed

limits how often the code below it is executed. self.UpdateSpeed counts down. Once it gets below zero, it is reset to the designated “time to wait” (UpdateSpeed) and the rest of the move code is run.