Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Trying to use custom animations but they don't work in game. Why?

So I'm testing out custom animations for the first time. I created my animations and exported them with no problem. I created a script in the ServerScriptService and loaded my custom animations into it, when testing the game in studio it worked fine. So far so good. I exit Studio and test the game out through the Roblox Client, none of the animations work. Went back and made sure I uploaded the updated animations then tried it in the client again, still won't work. So the animations work in Studio but not through the client. I'm not at all sure why this is happening

local Players = game:GetService("Players")
 
local function onCharacterAdded(character)
	local humanoid = character:WaitForChild("Humanoid")
 
	for _, playingTracks in pairs(humanoid:GetPlayingAnimationTracks()) do
		playingTracks:Stop(0)
	end
 
	local animateScript = character:WaitForChild("Animate")
	animateScript.run.RunAnim.AnimationId = "rbxassetid://4919543425"        -- Run
	animateScript.walk.WalkAnim.AnimationId = "rbxassetid://4919543425"      -- Walk
	animateScript.jump.JumpAnim.AnimationId = "rbxassetid://4917206902"      -- Jump
	animateScript.idle.Animation1.AnimationId = "rbxassetid://616158929"    -- Idle (Variation 
	animateScript.idle.Animation2.AnimationId = "rbxassetid://616160636"    -- Idle (Variation 
	animateScript.fall.FallAnim.AnimationId = "rbxassetid://4917217060"      -- Fall
	animateScript.swim.Swim.AnimationId = "rbxassetid://616165109"          -- Swim (Active)
	animateScript.swimidle.SwimIdle.AnimationId = "rbxassetid://616166655"  -- Swim (Idle)
	animateScript.climb.ClimbAnim.AnimationId = "rbxassetid://616156119"    -- Climb
end
 
local function onPlayerAdded(player)
	player.CharacterAppearanceLoaded:Connect(onCharacterAdded)
end
 
Players.PlayerAdded:Connect(onPlayerAdded)

This is the script I'm using, is there something missing I need to add? Any help would be appreciated

2 comments

0

Are your animations R6 or R15?

0

My animation are R6, the default set in the game is R6, but whether I play the game my avatar is just stiff, doesn't have any animations

1 answer

Some of the animations show errors, but this works:

script.Parent.Animate.run.run.AnimationId = "rbxassetid://4919543425" --run
script.Parent.Animate.idle.Animation1.AnimationId = "rbxassetid://616158929" --1 (still)
script.Parent.Animate.idle.Animation2.AnimationId = "rbxassetid://616160636" --2 (moving)
script.Parent.Animate.swim.Swim.AnimationId = "rbxassetid://616165109" --swim
script.Parent.Animate.swimidle.SwimIdle.AnimationId = "rbxassetid://616166655" --swimidle
script.Parent.Animate.walk.WalkAnim.AnimationId = "rbxassetid://4919543425" --walk
script.Parent.Animate.jump.JumpAnim.AnimationId = "rbxassetid://4917206902" --jump
script.Parent.Animate.climb.ClimbAnim.AnimationId = "rbxassetid://616156119" --climb
script.Parent.Animate.fall.FallAnim.AnimationId = "rbxassetid://4917217060" --fall

3 comments

0

I tried this and the script doesn't work, is there something specific I'm suppose to do with it?

0

Oh insert into starterplayer.startercharacterscripts

0

Still didn't work, am I suppose to insert the script you gave as it is or edit the one I had?

This discussion is preserved as it was. New answers, comments, and votes are closed.