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

How do I run code when a player sits in a seat? Will UserInputService work? (for vehicle)

Asked by 5 years ago

I am making a vehicle. I have never worked with seats before. How do I make it run code when I sit in a seat, and will UserInputServiceWork? I am making a vehicle. Thanks --Your FierceBreakfeast TheFierceWaffle

0
Do you mean play a animation when,you sit down Carforlife1 59 — 5y

1 answer

Log in to vote
0
Answered by
kag_e 12
5 years ago
Edited 5 years ago

You could try taking a shot at it with the Touched but basically if the Player is touching the seat run the code. Poor example down below..

local Seat = game.Workspace -- change game.Workspace to your seat

function Touched() -- any part thats touching
    --code
end

Seat.Touched:Connect(Touched)
Ad

Answer this question