I've tried several Script but it doesnt work
please help here is the thing i've tried if it help
local seat = script.Parent
function SeatIsSatIn(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local character = hit.Parent
local humanoid = character.humanoid
wait(0.1)
if humanoid:GetState() == Enum.HumanoidStateType.Seated then
local animation = Instance.new("Animation")
animation.AnimationId = "https://www.roblox.com/library/4748428498/Couch-sitting"
local track = humanoid:Loadanimation(animation)
track:Play()
local function StateChanged(oldState, newState)
if newState ~= Enum.HumanoidStateType.Seated then
track:Stop()
end
end
humanoid.StateChanged:connect(StateChanged)
end
end
end
seat.Touched:Connect(SeatIsSatIn)

3 comments
Please put your code in a code block
yes please put it in a code block
I've edited it now it should be in a code block