Stepped (Event): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
m Text replacement - "</code>" to "</SyntaxHighlight>"
Tags: mobile web edit mobile edit
m Text replacement - "<SyntaxHighlight code="lua">" to "<syntaxhighlight lang="lua">"
Line 9: Line 9:
{{Example|
{{Example|
This code will print <samp>Stepped</samp> every frame.
This code will print <samp>Stepped</samp> every frame.
<SyntaxHighlight code="lua">
<syntaxhighlight lang="lua">
game:GetService('RunService').Stepped:connect(function()
game:GetService('RunService').Stepped:connect(function()
print("Stepped")
print("Stepped")

Revision as of 03:56, 27 April 2023

Stepped ( number time, number step )
Description Fired on every "step" in the RunService, a time of approximately 1/30th of a second. The time argument is how long the RunService has been running overall. The step argument seems to always be 1/30, which is an approximation of one frame.
Member of: RunService


Example

This code will print Stepped every frame.

game:GetService('RunService').Stepped:connect(function()
	print("Stepped")
end)