This script work and it’s in serverscriptservice and it just tp a player into a free chair when they join the game, but for some reason, they can escape from it, I tried this way and having the jump-power set to zero and none of them help
local chairFolder = game.Workspace.FolderChair
local Players = game.Players
-- Table to hold the chair variables, and if they're taken or not.
local seatStatus = {
{chair = chairFolder.Seat, taken = false},
{chair = chairFolder.Seat2, taken = false},
{chair = chairFolder.Seat3, taken = false}
}
function seatPlayers(player)
player.CharacterAdded:Connect(function(character)
local hum = character:FindFirstChildOfClass("Humanoid")
if hum then
hum:SetStateEnabled(Enum.HumanoidStateType.Jumping, false) -- Disable jumping
-- Looks through all seats in the table and checks if they're taken.
for _, v in pairs(seatStatus) do
if not v.taken then
task.wait(0.5)
v.chair:Sit(hum)
v.taken = true
break
end
end
end
end)
end
Players.PlayerAdded:Connect(seatPlayers) -- Fires the seatPlayers function when a player joins the game