i made a seat script that only allow me to sit in it, but when i sit i cant get out, wt can i do for just get out with "space" for example?
local allowed = {438845010}
local players = game:GetService("Players")
local seat = script.Parent
seat.Disabled = true
seat.Touched:Connect(function (hit)
if seat.Occupant then return end
local player = players:GetPlayerFromCharacter(hit.Parent)
for i = 1, #allowed do
if allowed[i] == player.UserId then
local humanoid = player.Character:FindFirstChildWhichIsA("Humanoid")
if humanoid then
seat:Sit(humanoid)
end
break
end
end
end)

2 comments
Why not use the Seat object Roblox provides by default?
but can i do it for only me sit? like, no one can sit in it, ppl will touch but not sit and pose. if yes, how?