Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I move a player from one seat to another?

Asked by 5 years ago

I have this script where a player clicks a GUI Button to move to another seat. The camera changes, but the Player wont actually move to the other seat. I need them to move from VehicleSeat to Seat.

local train = script.Parent.Parent.Parent.Train.Value

function ChangeDirection()
    if train.VehicleSeat.Direction.Value == 1 then
        workspace.CurrentCamera.CameraSubject = train.BackBrick    
        game.Players.LocalPlayer.Character.Humanoid.SeatPart = train.Seat
    else
        workspace.CurrentCamera.CameraSubject = train.FrontBrick
    end
end


script.Parent.MouseButton1Down:connect(ChangeDirection)
0
I think it's obvious why the character isn't moving, you haven't even scripted that part yet, you only have moved the camera. And you'll want to use the sit function to make the player sit. SteamG00B 1633 — 5y
0
I used Character.Humanoid:Sit(BackSeat) but that didn't work at all CarlPlandog 20 — 5y
0
other way around SteamG00B 1633 — 5y
0
BackSeat:Sit(Character.Humanoid)? CarlPlandog 20 — 5y

Answer this question