Hi! Are you having trouble trying to code/script moving platforms for your Roblox game? Well I have created a system that makes it extremely simple!!
HERE’S A TUTORIAL ON HOW TO USE THE MOVING PLATFORM SYSTEM AND WHAT EACH VALUE DOES!!!
Simply there are two parts in the model called Start and Finish, you can move these around as you please, and set the starting positions and ending positions! (P.S, Don’t worry about removing the billboardguis or attachments from the parts, they automatically remove themselves once the game starts running, they’re simply there to give you a good idea for what it may look like!)
IF you have a Custom Platform Model you want to use for the platform, simply put it in the PlatformModel folder inside the model, ungroup your platform model (if it’s grouped), and rename the center part of the model to “Handle” in order for it to work!
Custom Platform Example:
Video Example:
WHAT EACH ATTRIBUTE DOES:
Now select the MovingPlatform model and open the properties tab and scroll down to the attributes section, the attributes control how the moving platform works!!
Active - Boolean: The active attribute simply states whether or not the platform is moving or not, if this value is set to true, the platform will move, if it’s set to false, it will not move (Setting it to false while the platform is moving will cause it to pause at it’s current position unless ResetWhenDeactivated is set to true)
AlignCFrame - Boolean: This attribute determines if the moving platform’s Position and Orientation should align with the Start and End goal CFrames/Orientations
Image and Video Example:
Delay - Number: Whenever the platform reaches it’s certain end and start goals, this value will control how long the platform stops once it reaches it’s goal before it continues to move again.
Direction - String: The Tween Direction of the Platform (Must be set to ‘In’, ‘Out’, or ‘InOut’ or else it won’t work) For more info on Tween Directions, visit here: EasingDirection | Documentation - Roblox Creator Hub
GoalReached - Boolean: A value that simply tells you if the platform has hit the end goal, if the Platform is looped, it will swap between these values as it moves back and fourth between the start and end position, if this value is set to true before starting the game, the platform will automatically start at the ending position instead of the starting position
Length - Number: Simply the amount of time in seconds it takes for the platform to reach it’s goal
MovementType - String: This value makes up how the platform should move, if this value is set to ‘Loop’ it will always move back and fourth between the start and end position, if it’s set to ‘LoopOnce’ then the platform will move back and fourth between the start and the end position once then it will stop, or if it’s set to ‘Once’ then the platform will move to the end position or start position then completely stop until it is set to active again.
Video Example:
ResetWhenDeactivated - Boolean: This value determines whether or not the platform will pause at it’s current position when it’s deactivated or if it resets back to it’s starting position when deactivated
Video Example:
Stick - Boolean: This value simply determines whether or not a player can stick to the platform
Video Example:
Style - String: The Tween Style of the Platform (Must be set to ‘Linear’, ‘Sine’, ‘Back’, ‘Quad’, ‘Quart’, ‘Quint’, ‘Bounce’, ‘Elastic’, ‘Exponential’, ‘Circular’, or ‘Cubic’ or else it won’t work) For more info on Tween Styles, visit here: EasingStyle | Documentation - Roblox Creator Hub
AND THAT’S IT!! Hopefully this helps people out!!
Model Link: https://create.roblox.com/store/asset/18628600401/CUSTOMIZABLE-MOVING-PLATFORM-SYSTEM
If there’s any bugs or things I should fix let me know!!
Update: Fixed Player’s bugging out when sticking to moving platforms