:Sit() not working properly?

My goal is to have the server sit people in seats when needed.

The server is running the code but it’s not working properly for some people. Literally nothing happens for some and for others it works properly. For me, it never works.
My Code:

game.Workspace.TestSeat:Sit(game.Workspace.Duckzye.Humanoid)

I’ve searched around for solutions but most involve running the code on server (which I am).
Does anyone know how to fix this or can anyone offer any help? Thanks!

When is when needed? After clicking on a button? Touching a part?

1 Like

Why are you bothering to make people sit on Seats? Roblox does that for you, that’s why they’re actually called seats and not parts. Do not include any code. Just insert a Seat instance onto workspace, anchor it and literally touch it.

Even if it was necessary to script it, like in Click to Sit scenarios, it would be wise to do it from the client as it automatically replicates to the server.

They want to force the person to sit at a certain moment.

I’ve done this manually before. I had a keybind to enter a vehicle and I had to call the sit function on the humanoid.

I’m aware of the different situations needed to force sit. This is why I included this part.

So, you contradicted yourself? Why say

if you acknowledge that there are actually situations where this is needed?

Could we see more or your script? The code you provided works as intended.

2 Likes

That’s the thing! It works for 99% of people! For me and some others it wont sit us though. No errors are given.

Could we see the rest of your code? Since the issue probably is not from that line of code.

I’m positive it’s the :sit()

My code works as intended.
I used the line above in studio without any other code and it still wouldn’t work for my character.

Then why are you asking for help if you will only provide one line of code that functioned as intended when I tested it?

I’m asking for help or a solution to the :sit() issue not my code that fires it.
I know my code that fires it works as intended.

I’ve told you that the :sit() doesn’t even work on it’s own.

I used the following code below to fix the code posted in your post:

game.Workspace.TestSeat:Sit(game.Workspace."ROBLOX USERNAME HERE".Humanoid)

What I got when using the code:
https://gyazo.com/c1e2da6b6d679522e40ad2d2ee44eb61

Try running the code in the command bar on the server and not the client.

That is the server. (CHAR COUNT)

If you’re having a problem with sit, just move the character’s PrimaryPartCFrame to the CFrame of the seat. Should provide the desired result.