Skip to main content

Ride Seat Plugin

See RideSeatModule for API

About

The RideSeatPlugin adds functionality to seats so that they can be controlled.

Quick Setup

Adding a RideSeatPlugin to an animation player is very simple and works on both server and client.

local rideSeatPluginModule = plugins.rideSeat
local createRideSeatPlugin = rideSeatPluginModule.createRideSeatPlugin

local rideSeatPlugin = createRideSeatPlugin(animPlayer)

This looks through the AnimationPlayer's currentModel for Seat Instances and adds them to the RidePlugin.

It works for the majority of rides and scenarios.

danger

This DOES NOT work by default with StreamingEnabled.

You MUST setup your TrainModel or whatever AnimationModel that contains the seats for the ride so that it's ModelStreamingMode is set to Persistent!

See Model.ModelStreamingMode and Enum.ModelStreamingMode for more info.

If you would like an alternative method for setting up your ride for StreamingEnabled that provides more control and more complexity, look at the customSeat plugin.

Locking/Unlocking Players

rideSeatPlugin:lockOccupants()
-- and
rideSeatPlugin:unlockOccupants()

Kicking Players Out of Seats

rideSeatPlugin:unlockOccupants()
rideSeatPlugin:disableSeats()

task.wait(3)

rideSeatPlugin:enableSeats()

Disabling Open Seats

Preventing Players From Jumping In While Ride Is In Motion

rideSeatPlugin:lockOccupants()
rideSeatPlugin:disableOpenSeats()