Reset

Constructor:

Reset()

Description

Rotates the vehicle seat to make it return to (0,0,0), and raise its position for a certain distance.

Examples

Create a part and a seat. When the avatar touches the part, make the avatar sit in the seat.

local part = RWObject.Create("Part") -- create a part
part.Position = Vector3.New(2,1,2)
part.Parent = WorkSpace
local seat = RWObject.Create("Seat") -- create a seat
seat.Position = Vector3.New(3,1,3)
seat.Parent = WorkSpace
part.CollisionEnter:Connect(function(hit) -- make the avatar equipped with the tool when touching the part.
    coroutine.start(function()
        if hit:IsClass("Avatar") then
            seat:Sit(hit) -- make the avatar sit in the seat
            coroutine.wait(2)
            seat:Reset() -- rotate to return
        end
    end)
end)