Stepped (Event): Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>Mattchewy Extra comma removed |
m Text replacement - "</SyntaxHighlight>" to "</syntaxhighlight>" |
||
(20 intermediate revisions by 7 users not shown) | |||
Line 1: | Line 1: | ||
<onlyinclude> | <onlyinclude>{{Event|name = Stepped | ||
{{Event| | |arguments = [[number]] <var>time</var>, [[number]] <var>step</var> | ||
name = Stepped | |description = Fired on every "step" in the RunService, a time of approximately 1/30th of a second. The <var>time</var> argument is how long the RunService has been running overall. The <var>step</var> argument seems to always be 1/30, which is an approximation of one frame. | ||
|arguments = [[ | |object = RunService | ||
|description = Fired on every | |}}</onlyinclude> | ||
|object = | |||
{{clear floats}} | |||
</ | |||
{{Example| | |||
This code will print <samp>Stepped</samp> every frame. | |||
<syntaxhighlight lang="lua"> | |||
game:GetService('RunService').Stepped:connect(function() | |||
print("Stepped") | |||
end) | |||
</syntaxhighlight>}} | |||
[[Category:Events]] |
Latest revision as of 04:36, 27 April 2023
![]() | |
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)