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

[SOLVED] Why is this R6 default ROBLOX animation not playing on a dummy?

I want to create a game like 'Sodium Chloride' or 'Steamed Hams!', but I've noticed that they use the default ROBLOX animations for R6.

I've copied the default animations from the player, (R6) and inserted it into the StarterGui

I put in this LocalScript named "Animate" into the dummy:

local Humanoid = script.Parent.Humanoid
local Idle1 = Humanoid:LoadAnimation(game.StarterGui.Idle1)
local Idle2 = Humanoid:LoadAnimation(game.StarterGui.Idle2)

local WalkAnim = Humanoid:LoadAnimation(game.StarterGui.WalkAnim)
local JumpAnim = Humanoid:LoadAnimation(game.StarterGui.JumpAnim)
local FallAnim = Humanoid:LoadAnimation(game.StarterGui.FallAnim)

game:GetService("RunService").RenderStepped:Connect(function()
	Idle2:Play()
end)

However, it is not playing. I believe it may be my placement of the animations, or it could just be my internet/pc that is getting in the way.

There are no output errors or warnings, nothing.

Any help please?

EDIT : The comments are very helpful right now, but I want answers. If you have one, feel free to answer down below. Thank you! ^-^

14 comments

0

Try exporting the animations in the animation editor and entering the ids in there. I apolagize if this is what you are trying to do because idk what you are accessing in startergui

2

You don't need to play it every time it renders

0

Okay, Let me try that.

0

Just try doing Idle2:Play() or try this tutorial: https://www.youtube.com/watch?time_continue=150&v=8fS8Ly6SAok&feature=emb_title I cannot really help as I don't know what you are trying to achieve

0

Nope, doesn't work.

0

Do what firestarroblox said, it makes more sense than my idea

0

Okay. I'll try.

0

Nope. Still doesn't work.

0

Have you tried the tutorial?

0

Also please tell us what you are trying to achieve.

0

Okay, so, I want the dummy I created to play the default ROBLOX R6 animations (Fall, Jump, Idle, etc.). I tried playing the animation IDs but it doesn't work.

0

Oh, thats easy.

0

Bruh you can't use game.StarterGui, use game.Players.LocalPlayer.PlayerGui instead.

0

Uhhhh yeah, as you can see this was about a year ago, I've probably moved on from this project lol

3 answers

✓ Accepted answer

This is just a modified version of the normal animation script.

This script contains all the R6 animations except emotes.

Just put it in your dummy and it will work.

I just copied the normal animation player and then removed the emote player (since it was using game.Players.LocalPlayer and server scripts cant access that) note that for NPC's you cannot use LocalScripts you need to use scripts.

If you want to play an emote you will have to use a separate script to load in the animation.

You can't use the standard Animate script in an NPC. Localscripts don't run outside of the player/character. Also there's a couple of things related to I believe chat events that depend on the LocalPlayer in that script, you have to remove those occurences.

You said you put a LocalScript inside the dummy. I assume the Dummy is in workspace. LocalScripts never run in workspace.

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