-
What do you want to achieve?
I want to have a nice sitting pose animation for my game. -
What is the issue?
I’ve already done my animation for the sitting pose, and it looks great!
Roblox Studio:
Only in studio…
While playing the game:
You might not see it at first, but the issue is that in game it looks like it’s playing the default sit animation, and my animation at the same time. Take a look at how the character’s knees are bended and its hands are facing down. It doesn’t look like that in the first image.
3. What solutions have you thought of so far?
- Changed the HumanoidRootPart
RootPriority
value to 1. - Unanchored all character body parts.
- Disabled the default sit animation.
Extra details:
I have a ProximityPrompt
that whenever it’s triggered, it uses the Seat:Sit(Humanoid) event.
local proximityPrompt = script.Parent
local seat = proximityPrompt.Parent.Parent
seat:GetPropertyChangedSignal("Occupant"):Connect(function()
if seat.Occupant then
proximityPrompt.Enabled = false
else
proximityPrompt.Enabled = true
end
end)
proximityPrompt.Triggered:Connect(function(player)
seat:Sit(player.Character.Humanoid)
end)
Maybe the :Sit(Humanoid) event has something to do with this whole issue. I tried removing the :Sit(Humanoid) event, and it didn’t work.
I also have another script that loads the animation I made. I got this script from a Youtube tutorial, but they didn’t even bother to show the script. They just showed how to get the model with the script, so I put that script into my seat.
seat = script.Parent
function added(child)
if (child.className=="Weld") then
local human = child.part1.Parent:FindFirstChild("Humanoid")
if human ~= nil then
local num = math.random(1, 2)
if num == 1 then
anim = human:LoadAnimation(seat.Animation1)
anim:Play()
else
anim = human:LoadAnimation(seat.Animation2)
anim:Play()
end
end
end
end
function removed(child2)
if anim ~= nil then
anim:Stop()
anim:Remove()
end
end
seat.ChildAdded:connect(added)
seat.ChildRemoved:connect(removed)
I don’t think this script has anything to do with the issue, but here it is in case you guys need it.