I've just created a sitting animation, and I want to make it that if I sit down on a chosen seat it will use my animation, but for my other seats it won't. Can anyone help me?
check when a child is added that is a weld and is named "SeatWeld"
script.Parent.ChildAdded:Connect(function(c) -- when a child is added (assuming the parent is the seat) if c:IsA("Weld") and c.Name == "SeatWeld" then -- if the added child is a weld and is named "SeatWeld" if c.Part1.Parent:FindFirstChildOfClass("Humanoid") then -- if the script finds a humanoid local anim = Instance.new("Animation") -- makes the animation anim.AnimationId = "rbxassetid://AssetIdHere" -- sets the id of it local track = c.Part1.Parent:FindFirstChildOfClass("Humanoid"):LoadAnimation(anim) -- loads the animation track:Play() -- plays the animation end end end)
https://www.robloxdev.com/api-reference/class/Seat