-- Define a function to make the player character sit
local function sit() local character = game.Players.LocalPlayer.Character if character then local humanoid = character:FindFirstChildOfClass("Humanoid") if humanoid then humanoid.Sit = true end end end
-- Define a function to make the player character stand up
local function standUp() local character = game.Players.LocalPlayer.Character if character then local humanoid = character:FindFirstChildOfClass("Humanoid") if humanoid then humanoid.Sit = false end end end
-- Connect the Humanoid.Jumping event to the standUp() function
game.Players.LocalPlayer.CharacterAdded:Connect(function(character) local humanoid = character:FindFirstChildOfClass("Humanoid") if humanoid then humanoid.Jumping:Connect(function() standUp() end) end end)