E to Sit Script

Hi,

I have recently been trying to create an “E to Sit” script but all of my attempts were unsuccessful, can anyone help with this?

1 Like

You could create a local script in starterplayerscripts, then you can use UserinputService and when a user inputs ‘E’ then load in a sitting animation and play it.

3 Likes

I mean for a player to sit on an actual seat, the “Seat” object in a game.

So if they are a near a seat and they press “E” then they will sit?

2 Likes

I suggest doing the following:

  1. The player presses E; use UIS
  2. You change the Humanoid Property “Sit” to true (You can handle this client-sided)
    2.1 If the player is already sitting you turn this to false. (Optional)
  3. Load the animation.

I am not sure if I understood this right, but if im right you were searching for a script which let the player sit anywhere, as I read from:

For refrence watch: https://youtu.be/vujSeb6X2bE

3 Likes

Do you mean like you press “E” and you do a animation?

1 Like

Yeah, i want it to sit to the nearest seat.

1 Like

There is a video for that, (Not taking credit) https://www.youtube.com/watch?v=japnJf9P34U

4 Likes