This is based on my own tests, along with this post Seat:Sit() NOT WORKING! which mentions that Sit isn’t supposed to be used on client, which sounds ludacris, but seems to be the case here. SImply have a seat and call Seat:Sit(LocalPlayer.Character.Humanoid) from the client, and on occassion it will break/. If this is intentional, then why? There’s no reason for it to server side only
Expected Behavior
Can be found here:
On occassion, calling Seat:Sit() for a valid Humanoid does not work
Actual Behavior
On occasion, you will not sit, which breaks gameplay
Issue Area: Engine Issue Type: Other Impact: High Frequency: Often
I also notice this. Why is this happening? Are we not supposed to call Seat:Sit() from the client? Makes little sense. Can we have some light on this issue?
Repro is trivial just make a prompt or click detector that makes you sit from the client and press it a few times. There seems to be some internal debounce but I can’t really tell.
EDIT: Mitigation found. Retry in a loop like a neanderthal
function sitHumanoid(seat: Seat, hum: Humanoid, retries: number?)
retries = retries or 20
for i = 1, retries do
print("trying to sit", i)
if seat.Occupant ~= hum then
seat:Sit(hum)
else
break
end
task.wait(.1)
end
end
From my tests the debounce seems to be around 1-1.2 seconds.
Yeah a retry loop seems like the way to go. I love how Roblox is like “give feedback for new feature” while ignoring years old stuff.
Here’s my refactor of your code:
local function sit(seat: Seat, hum: Humanoid, retries: number?)
if retries == nil then retries = 20 end
for i = 1, retries do
if seat.Occupant == hum then break end
seat:Sit(hum)
task.wait(0.25)
end
end
Not sure if it’s the same issue, but I have found that it consistently does nothing (including no console error) if you call Seat:Sit(Humanoid) where Seat is a locally created instance.
Seats that the server can see? Works fine, sits every time.
Seats that only the client can see / the client has created? Silent fail every time.