Class
SkateboardController
Translates player input into throttle and steer axis values for a
SkateboardPlatform.
A SkateboardController is an object responsible for translating PlayerActions
to movements with a SkateboardPlatform.
Properties 2#
Steerfloat | The direction of movement, tied to the keys A and D. Must be 1 (right), 0 (straight), or -1 (left). Will refresh back to 0 unless constantly set.ReadSafeReadOnlyNotReplicated |
Throttlefloat | The direction of movement, tied to the keys W and S. Must be an integer 1 (forward), 0 (null), or -1 (reverse). Will refresh back to 0 unless constantly set.ReadSafeReadOnlyNotReplicated |
Steer: float#
ReadOnlyNotReplicatedReadSafe
The direction of movement, tied to the keys A and D. Must be 1 (right), 0 (straight), or -1 (left). Will refresh back to 0 unless constantly set.
Throttle: float#
ReadOnlyNotReplicatedReadSafe
The direction of movement, tied to the keys W and S. Must be an integer 1 (forward), 0 (null), or -1 (reverse). Will refresh back to 0 unless constantly set.
Events 1#
| AxisChanged | Fired when any input state of the skateboard controller is updated. |
AxisChanged(axis: string)#
Fired when any input state of the skateboard controller is updated. The
axis is fired with either "Throttle" if the throttle state of the
skateboard was updated or "Steer" if the steering state of the
skateboard was updated.
| Name | Type | Default | Description |
|---|---|---|---|
axis | string | A string, either "Throttle" or "Steer", indicating which input
state of the skateboard controller changed. |
Inherited members#
Inherited from Instance 58
Properties (10)
Archivable, archivable, Capabilities, IsInSandbox, Name, Parent, PredictionMode, RobloxLocked, Sandboxed, UniqueId
Methods (39)
AddTag, children, ClearAllChildren, Clone, clone, Destroy, destroy, FindFirstAncestor, FindFirstAncestorOfClass, FindFirstAncestorWhichIsA, FindFirstChild, findFirstChild, FindFirstChildOfClass, FindFirstChildWhichIsA, FindFirstDescendant, GetActor, GetAttribute, GetAttributeChangedSignal, GetAttributes, GetChildren, getChildren, GetDebugId, GetDescendants, GetFullName, GetStyled, GetStyledPropertyChangedSignal, GetTags, HasTag, IsAncestorOf, IsDescendantOf, isDescendantOf, IsPropertyModified, QueryDescendants, Remove, remove, RemoveTag, ResetPropertyToDefault, SetAttribute, WaitForChild