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.
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:
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)