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?
✓ ANSWER ACCEPTED
Trying to get a sitting animation seat for only one seat, can someone help?
2 answers
✓ Accepted answer
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)
2 comments
0
local script or just a script?
0
a script in the seat
1 comment
0
yeah i was lazy enough to not make it a link
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Try getting the seat ocuppant and setting the animation for him