CartoonFactor (Property): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Mr Doom Bringer
No edit summary
Fix broken example and code formatting
 
(16 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{CatUp|Properties}}
<onlyinclude>{{Property
|name = CartoonFactor
|property = [[Number]] ''tendency to face target''
|description = Sets the tendency for the brick with the RocketPropulsion to face its target.
|object = RocketPropulsion
}}</onlyinclude>
 
{{clear floats}}
 
==Description==
The Rocket Propulsion object uses this value to determine how cartoonish a rocket should act. In real life, rockets tend to aim just a little bit up from their target to counter the effects of gravity. 0 will point straight up in the air, where 1 will point straight at a target. The default is 0.7 (points a bit up from the target).


The Rocket Propulsion object uses this value to determine how cartoonish a rocket should act. In real life rockets tend to aim just a little bit up from their target to counter the effects of gravity. 0 will point straight up in the air, where 1 will point straight at a target.
{{Example|Here's a [[Script]] that would keep the [[RocketPropulsion]] facing its target.<syntaxhighlight lang="lua">
local RoPr = Instance.new('RocketPropulsion', game.Workspace)


{{Property|
while wait() do
name = CartoonFactor
  RoPr.CartoonFactor = 1
|property = [[Number]] ''tendency to face target''
end</syntaxhighlight>}}
|description = Sets the tendency for the brick with the RocketPropulsion to face its target. 0 means it will always point straight up. 1 means it will try to point straight at the target. The default is 0.7 (points a bit up from the target).
|object = [[RocketPropulsion]]
|}}


[[Category:Properties]]
[[Category:Properties]]

Latest revision as of 03:22, 18 April 2023

CartoonFactor
Property Number tendency to face target
Description Sets the tendency for the brick with the RocketPropulsion to face its target.
Member of RocketPropulsion


Description

The Rocket Propulsion object uses this value to determine how cartoonish a rocket should act. In real life, rockets tend to aim just a little bit up from their target to counter the effects of gravity. 0 will point straight up in the air, where 1 will point straight at a target. The default is 0.7 (points a bit up from the target).

Example
Here's a Script that would keep the RocketPropulsion facing its target.
local RoPr = Instance.new('RocketPropulsion', game.Workspace)

while wait() do
   RoPr.CartoonFactor = 1
end