Hello! I recently released some animations for my game, and I noticed that whenever I’m playing the game, the animations won’t work. When I go into Studios to test them, they work perfectly fine. I have no idea what is wrong with it, so I came to the dev forum for help! If you can figure it out, that would be great!
Bed script:
seat = script.Parent
function added(child)
if (child.className=="Weld") then
human = child.part1.Parent:FindFirstChild("Humanoid")
if human ~= nil then
anim = human:LoadAnimation(seat.Animation)
anim:Play()
end
end
end
function removed(child2)
if anim ~= nil then
anim:Stop()
anim:Remove()
end
end
seat.ChildAdded:connect(added)
seat.ChildRemoved:connect(removed)
Eat script:
local Tool = script.Parent
local EatAnimation = Tool.EatAnimation
Tool.Equipped:Connect(function(Mouse)
Tool.Activated:Connect(function()
local Character = Tool.Parent
local AnimationTrack = Character.Humanoid:LoadAnimation(EatAnimation)
AnimationTrack:Play()
end)
end)