I know you can use humanoid:SetStateEnabled(Enum.HumanoidStateType.Seated)
to prevent a player from sitting. But the player still gets seated by scripts that use the seat:Sit(humanoid)
method. Apart from editing every script using this function, is there a simpler way to prevent a player from having the ability to sit?
Humanoid:SetStateEnabled(Enum.HumanoidStateType.Seated, false)
This typically should disable all property changes, however I’ve had issues with this in the past, so if this doesn’t work, then there are several other alternatives;
Humanoid:GetPropertyChangedSignal("Sit"):Connect(function() Humanoid.Sit = false end)
OR
(Client)
for _, seat in workspace:GetDescendants() do
if seat:IsA("Seat") then
seat.Disabled = not seat.Disabled
end
end
You should not encounter issues with the stateenabled command, but you might also prefer one of the other options depending on the playstyle of your game.