GetMoonDirection (Method): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Legend26
No edit summary
m Text replacement - "</SyntaxHighlight>" to "</syntaxhighlight>"
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<onlyinclude>{{Method
<onlyinclude>{{Method
|name=GetMoonDirection
|name=GetMoonDirection
|returns=[[Vector3]] ''[[lookVector]]''
|returns=[[Vector3]]
|description=It returns the [[lookVector]] of the moon.  If this [[lookVector]] were used in a [[CFrame]], the [[BasePart]] would face the moon.
|description=It returns the [[lookVector]] of the moon.  If this [[lookVector]] was used in a [[CFrame]], the [[BasePart]] would face the moon.
|object=Lighting
|object=Lighting
}}</onlyinclude>
}}</onlyinclude>


{{clear floats}}
{{clear floats}}
{{Example|
<syntaxhighlight lang="lua">
print(game.Lighting:GetMoonDirection())
</syntaxhighlight>


<pre>
Would print <samp>0.619343221, 0.357578009, 0.698964953</samp> if the [[TimeOfDay (Property)|TimeOfDay]] is set to 14:00:00.
print( game.Lighting:GetMoonDirection() )
}}
</pre>
 
Would print '0.619343221, 0.357578009, 0.698964953' if the TimeOfDay is set to 14:00:00.
 
<noinclude>[[Category:Methods]]</noinclude>
<noinclude>[[Category:Methods]]</noinclude>

Latest revision as of 05:38, 27 April 2023

GetMoonDirection( )
Returns Vector3
Description: It returns the lookVector of the moon. If this lookVector was used in a CFrame, the BasePart would face the moon.
Member of: Lighting
Example
print(game.Lighting:GetMoonDirection())

Would print 0.619343221, 0.357578009, 0.698964953 if the TimeOfDay is set to 14:00:00.