How to unseat a player in a module script?

  1. What do you want to achieve? Keep it simple and clear!
    I would like to figure out how to unsit a character when handcuffed. But when I attempt this, It only unsits the player on the client, so everybody else can still see the player stuck in the chair.

  2. What is the issue?
    I cannot figure out for the life of me how to unsit a player on the server using a module. It always ends in the client being unsat but not on the server, so everyone still sees the character stuck in the chair

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I attempted to unsit the player using the following code; argPlayer.Character.Humanoid.Jumping = true I also attempted using events, But seem to make no change.

Any help would be appreciated.

From the docs,

There are two ways for a character to get out of a seat. When a player jumps, they are removed from the seat. However this can also be done manually by destroying the seat weld, for example:


I don’t think this would be the solution to my issue, As I would not be able to figure out the exact chair part the player was in.

Do you have the player who is sitting? If so you can find the seat by looking at the humanoid’s SeatPart property

If you use what @7z99 said in combination with Humanoid.SeatPart

It would look like


This is what the script looked like;

if argPlayer.Humanoid.Sit = true then
      argPlayer.Humanoid.Jumping = true

I would include the rest of the handcuff code but due to the way it is set up, it’d take a large portion of the page.

Okay, in that case you can look at argPlayer.Character for the humanoid, then go through the humanoid’s SeatPart property to look for and destroy the weld as Beans said

1 Like

So it does work well on the client, Only issue that is still persisting is that the argPlayer will still get stuck in the SeatPart on the server.

This is inside a module script.

		if argPlayer.Character.Sit == true then

I’m pretty much out of ideas. I tried to fire events, platformstand the humanoid, Jump it, unsit it etc.

To be sure, you are running this on the server right?

I am running it on the server in ServerScriptService.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.