How do I force a player to sit in Roblox Studio

It seems that just doing

humanoid.Sit = true
humanoid.JumpPower = 0
humanoid.JumpHeight = 0
humanoid.Jump = false

won’t work, and if the player tries to jump, it will just unsit them.
I’ve tried checking when Jump changes, and then sitting them again instantly, but that doesn’t work.

the matrix whispered in my ear and told me this might work

humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, false)

you could try Seat:Sit(humanoid). I’ve done that before and it seems to work.

Try adding this test script:

local plrs = game:GetService("Players")
function onCharacterAdded(char)
	local hum = char:findFirstChild("Humanoid")
	hum:SetStateEnabled(Enum.HumanoidStateType.Jumping, false)
	hum.Sit = true
end

function onPlayerAdded(plr)
	plr.CharacterAdded:connect(onCharacterAdded)
end
plrs.PlayerAdded:connect(onPlayerAdded)

Should end you up sitting and not being able to jump:

i dont want it to be a seat, just to randomly sit on the ground, pretty much just “resting”

found this magical script that worked on the toolbox.

local SEQUENTIAL_JUMP_LIMIT = 0
local PENALTY_DURATION = math.huge*math.huge*math.huge
local JUMP_TIME = 0.75

local NO_FADE_TIME = 2
local ONE_STEP = 1 / 30
local INCREMENT = (1 / (PENALTY_DURATION - NO_FADE_TIME)) * ONE_STEP

local PlayersService = game:GetService('Players')

local Character = script.Parent
local Humanoid = Character:WaitForChild('Humanoid')
local Player = PlayersService:GetPlayerFromCharacter(Character)

local LastJumpTime = 0
local SequentialJumps = 0
local LastPenaltyTime = 0


local function OnHumanoidChanged(property)
	if property == 'Jump' then
		local now = tick()
		if now - LastPenaltyTime <= PENALTY_DURATION then
			Humanoid.Jump = false
		else
			if now - LastJumpTime > 0.25 then
				SequentialJumps = (now - LastJumpTime < JUMP_TIME) and SequentialJumps + 1 or 0
			end
			if SequentialJumps >= SEQUENTIAL_JUMP_LIMIT then
				LastPenaltyTime = now
			end
			LastJumpTime = now
		end
	end
end

Humanoid.Changed:connect(OnHumanoidChanged)

ill try and implement it

Ok good luck!

fdasjhflasdkjhfllaksjd

This is code is AI generated :cry::cry: