How to make an animation play when a player sits in a chair
local seat = script.Parent
seat:GetPropertyChangedSignal("Occupant"):Connect(function()
local occupant = seat.Occupant
if occupant then
local humanoid = occupant.Parent:FindFirstChildOfClass("Humanoid")
if humanoid then
humanoid.Sit = true
local animation = humanoid:LoadAnimation(script.Animation) -- Replace script.Animation with your animation path
animation:Play()
end
end
end)
1 Like
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.