Edit:
For updated info on this, please check the private message associated with this bug report. I’ve found the issue to be with AnimationControllers.
When there’s one under the character model, the animation does not play no matter what I do. However, when I remove the AnimationController (automatically put on there by Roblox when adding a Humanoid I think), then the animation can play.
Old Info:
I can animate this character fine in the Animation Editor, and when I go to upload it to Roblox, I don’t see any issues. But, when I try to :Play() the animation, it just doesn’t work. I’ve reuploaded the same animation multiple times and have re-animated this idle animation three times now. Each upload, the same issue.
Video:
I know the code works because it works for other NPCs in my game. The issue itself seems to be the animation, but since every animation I try with this rig, I think it’s Roblox’s auto-moderation that is the problem here. I shouldn’t have to reanimate, but I did, and now it seems I have to re-rig the character when I shouldn’t have to.
I assume the “solution” to my problem is re-rigging the character, but I’ve spent like 2 hours trying to avoid that. Maybe it’s an issue with the rig, but again, I can animate it fine in the animation editor and it plays fine there. So, I’d assume it’s not a ‘me’ thing here.
Expected behavior
I expect my animation to play when I use the API to do so. And, if the asset is moderated, automatically or otherwise, I expect a message in my inbox or a notification about that moderation. There isn’t much for me to go off of here.
Code (script with local run context):
Note that there is code specific to my game below.
dropdown, click to open
local PlayerEnteredAWorld_RemoteEvent = game.Workspace.RemoteEventsFolder.PlayerEnteredAWorld_RemoteEvent
local WorldThisNPCIsIn_StringValue = script.Parent.Parent.WorldThisNPCIsIn_StringValue
local AnimationsFolder = script.Parent.Parent.Animations
local IdleBreathingAnimation = script.Parent.Parent.Humanoid:LoadAnimation(AnimationsFolder.IdleBreathingAnimation)
local function toggleIdleAnimationsForThisNPC(toggleState)
if toggleState == true then
--print("playing idle animation!")
IdleBreathingAnimation.Looped = true
IdleBreathingAnimation:Play()
else
--print("bruh!")
IdleBreathingAnimation:Stop()
end
end
PlayerEnteredAWorld_RemoteEvent.OnClientEvent:Connect(function(whatWorldIsThePlayerIn)
--print("hello!")
--print(whatWorldIsThePlayerIn, WorldThisNPCIsIn_StringValue.Value)
if whatWorldIsThePlayerIn == WorldThisNPCIsIn_StringValue.Value then
--print("YES!")
local toggleState = true
toggleIdleAnimationsForThisNPC(toggleState)
else
local toggleState = false
toggleIdleAnimationsForThisNPC(toggleState)
end
end)
A private message is associated with this bug report