Type Index Pages
- BillboardGui
- CanvasGroup
- Frame
- Hint
- ImageButton
- ImageLabel
- PlayerGui
- ScreenGui
- ScrollingFrame
- StarterGui
- SurfaceGui
- TextBox
- TextButton
- TextLabel
- UIAspectRatioConstraint
- UIGradient
- UIGridLayout
- UIListLayout
- UIPadding
- UIPageLayout
- UIScale
- UISizeConstraint
- UITableLayout
- UITextSizeConstraint
- VideoFrame
- ViewportFrame
- ChangeHistoryService
- CoreGui
- DataModelSession
- DockWidgetPluginGui
- MultipleDocumentInterfaceInstance
- Plugin
- PluginAction
- PluginGui
- PluginGuiService
- PluginManager
- PluginMenu
- PluginMouse
- PluginToolbar
- PluginToolbarButton
- QWidgetPluginGui
- Selection
- StandalonePluginScripts
- StatsItem
- StudioService
- StudioTheme
No results found!
-
Instance
- GameSettings
- DebugSettings
- BodyMover
- WeldConstraint
- HttpRbxApiService
- NotificationService
- Translator
- Lighting
- Beam
- GuiService
- UserInputService
- Studio
- Plugin
- HttpService
- Mouse
- BindableEvent
- RunService
- Pages
- Humanoid
- TestService
- PathfindingService
- Chat
- NetworkPeer
- Feature
- CharacterAppearance
- Constraint
- NetworkReplicator
- JointInstance
- Light
- BasePlayerGui
- AnalyticsService
- NetworkMarker
- BinaryStringValue
- FlyweightService
- Geometry
- LoginService
- InstancePacketCache
- ThirdPartyUserService
- TouchInputService
- RuntimeScriptService
- GuidRegistryService
- PartOperationAsset
- DialogChoice
- PhysicsService
- AdService
- TextService
- MarketplaceService
- TeleportService
- Accoutrement
- GamePassService
- AssetService
- InsertService
- PointsService
- ChangeHistoryService
- ServerScriptService
- JointsService
- LogService
- InputObject
- Toolbar
- LuaSettings
- RenderSettings
- AnimationTrack
- PhysicsSettings
- NetworkSettings
- CFrameValue
- Animation
- Color3Value
- BoolValue
- BrickColorValue
- Vector3Value
- AnimationController
- BindableFunction
- Button
- Trail
- LocalizationTable
- LocalizationService
- DebuggerBreakpoint
- DebuggerWatch
- ScriptDebugger
- Animator
- Attachment
- RemoteFunction
- RemoteEvent
- PluginManager
- Camera
- Stats
- Sky
- StarterPlayer
- Dragger
- TerrainRegion
- Path
- TextFilterResult
- Dialog
- StatsItem
- GoogleAnalyticsConfiguration
- ScriptContext
- ControllerService
- CacheableContentProvider
- ReflectionMetadataClasses
- ReflectionMetadataEnums
- DebuggerManager
- GuiBase
- UIBase
- LuaSourceContainer
- GuiItem
- DataModelMesh
- ServiceProvider
- ReflectionMetadataItem
- PostEffect
- PhysicsPacketCache
- TouchTransmitter
- RobloxReplicatedStorage
- Visit
- LuaWebService
- ScriptService
- FlagStandService
- VirtualUser
- SpawnerService
- TimerService
- CookiesService
- Team
- GroupService
- StarterGear
- Message
- PlayerScripts
- Configuration
- ContentProvider
- CollectionService
- Debris
- ReplicatedFirst
- ServerStorage
- ReplicatedStorage
- Folder
- TweenService
- Players
- ContextActionService
- StarterPlayerScripts
- SoundService
- KeyframeSequenceProvider
- VRService
- PluginGuiService
- Player
- Teams
- Pose
- Keyframe
- KeyframeSequence
- IntConstrainedValue
- DoubleConstrainedValue
- ForceField
- RayValue
- Fire
- Smoke
- Sparkles
- ParticleEmitter
- IntValue
- StringValue
- NumberValue
- Explosion
- ObjectValue
- SoundGroup
- UserGameSettings
- ClickDetector
- Sound
- Selection
- BadgeService
- TaskScheduler
- GlobalDataStore
- DataStoreService
- CustomEvent
- CustomEventReceiver
- VirtualInputManager
- FunctionalTest
- TweenBase
- SoundEffect
- ReflectionMetadataEvents
- ClusterPacketCache
- PVInstance
- FaceInstance
- Controller
- ReflectionMetadataCallbacks
- ReflectionMetadataFunctions
- ReflectionMetadataYieldFunctions
- ReflectionMetadataProperties
- ReflectionMetadata
- AdvancedDragger
- HapticService
- FriendService
- GamepadService
No Result Found !!!
FrontParamB
This item is deprecated. Do not use it for new work.
This item is not shown in the object browser. It is likely not intended for widespread use. Expect problems and changes.
The FrontParamB property is relevant when a part’s /BasePart/FrontSurface
is set to Motor or SteppingMotor and /BasePart/FrontSurfaceInput
is set to Constant or Sin. For Constant, it determines the constant rotational velocity of the motor. For Sin, it determines the frequency of the motor’s rotational velocity, using the following formula:
MotorVelocity = ParamB * math.sin(workspace.DistributedGameTime * ParamB)
In no other cases is this property used.
Code Samples
Motor Control
This code sample demonstrates how surface properties can be set using only a NormalId (Top, Front, etc). It switches a motor’s -SurfaceInput from NoInput, Constant and Sin to show how each work using -ParamA and -ParamB properties.
-- Paste this into a Script inside a part with a Motor SurfaceType local partMotor = script.Parent -- Place a brick called "MovingPart" so it is touching the Motor surface local partMoving = partMotor.Parent.MovingPart -- For this example, we use TopSurface, TopSurfaceInput, TopParamA and TopParamB -- However, this will work for all faces (NormalId): Top, Bottom, Left, Right, Front and Back -- A function to quickly set all surface properties at once local function setFaceSurfaceInputParams(normalId, surfaceType, inputType, paramA, paramB) local surfaceName = normalId.Name -- e.g. "Top", "Bottom", etc -- Syntax Note: in Lua, part.Something is the same as part["Something"] -- The difference is that the latter allows us to use a string ("Something"), while -- the former requires use of an identifier (.Something). Below, we build of each the surface -- properties below by concatenating the surface name with the property postfix. -- Set "___Surface", eg "TopSurface" partMotor[surfaceName .. "Surface"] = surfaceType -- Set "___SurfaceInput", eg "TopSurfaceInput" partMotor[surfaceName .. "SurfaceInput"] = inputType -- Set "___ParamA", eg "TopParamA" partMotor[surfaceName .. "ParamA"] = paramA -- Set "___ParamB", eg "TopParamB" partMotor[surfaceName .. "ParamB"] = paramB end local normalId = Enum.NormalId.Top while true do -- Set to NoInput, where the motor will not operate at all setFaceSurfaceInputParams(normalId, Enum.SurfaceType.Motor, Enum.InputType.NoInput, 0, 0) wait(1) -- Set to Constant, where motor rotational velocity = paramB setFaceSurfaceInputParams(normalId, Enum.SurfaceType.Motor, Enum.InputType.Constant, 0, .25) wait(2) -- Set to Sin, where motor rotational velocity = paramA * math.sin(time * paramB) -- Since we're using pi (~3.14), the frequency of rotation is 1 second (per definition of sine function) setFaceSurfaceInputParams(normalId, Enum.SurfaceType.Motor, Enum.InputType.Sin, .25, math.pi) wait(3) end
How this site use cookies
This Platform uses cookies to offer you a better experience, to personalize content, to provide social media features and to analyse the traffic on our site. For further information, including information on how to prevent or manage the use of cookies on this Platform, please refer to our Privacy and Cookie Policy.