Forcing an NPC humanoid to sit in a seat

I’ve been foraying into the world of NPCs hoping to add a bit more interaction to some of my games but I’ve hit a bit of a wall on something that I thought would be super simple. I’m trying to force my NPCs which use humanoids to sit in seats, but it doesn’t appear that :Sit() or having the NPC touch the seat actually gets them to sit down.

Here’s a video of what I’m dealing with, the seat clearly works as I can sit in it but the NPC doesn’t seem to care.

Is forcing NPCs to sit in this manner possible? Am I missing something in the NPCs structure that should make this work? Or have I stumbled across a bug?

Attached is a basic repro.
NPCTest.rbxl (54.0 KB)

Any help would be appreciated, thanks!

1 Like

Could you use Seat:Sit on the NPC’s Humanoid to make it sit on the seat? If you need the NPC to only sit when it touches the seat, perhaps you could hook up a BasePart.Touched event to it.

Let me know if this doesn’t work.

but it doesn’t appear that :Sit() or having the NPC touch the seat actually gets them to sit down.

Already tried that in the OP.

1 Like

That’s weird. Using :Sit() works for me in the repro. Are you doing this from the server or client when testing?

6 Likes

That’s bizarre, I tried :Sit() again in the repro and it worked like you said. I must’ve neglected to try it from the server without realizing it, that was silly.
Thanks!

2 Likes

It should be noted that :Sit() makes them sit down, but the animation of sitting doesn’t play - at least for me, when running in a command bar

workspace["Office Chair"].Seat:Sit(workspace.Character.Humanoid)

image

The SeatPart property of the NPC updates, and the Sit value of the humanoid is set to true, so they are sitting, but it just doesn’t appear to be sitting.

I was playing with a few different seated animations and one of them with a lower weight doesn’t seem to loop correctly into the other animations, haven’t gotten to addressing that yet.

image

1 Like