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

Why will my animation, loaded into the Animator, not seem to visually play?

My animation does not seem to want to play. I believe I have the correct ID and I know that the animation priority is set to Action. No errors. The animation is being played, but there is no visual animation happening. (When I go to test it, it shows it as running, but does not provide any visual change to my character) Below is my code.

local player = game.Players.LocalPlayer
local char = player.Character
local UIS = game:GetService("UserInputService")

wait()
local function createNewAnimation(animationID)
	local newAnimation = Instance.new("Animation")
	newAnimation.AnimationId = animationID
	newAnimation.Parent = script
	return newAnimation
end
local SToS = createNewAnimation("rbxassetid://6002096252")

local Animator = char.Humanoid.Animator 
	
UIS.InputBegan:Connect(function(key)
	if key.UserInputType == Enum.UserInputType.Keyboard then
		local keyPressed = key.KeyCode
		if keyPressed == Enum.KeyCode.N then

			local SToSAnimTrack = Animator:LoadAnimation(SToS)
			
			
			SToSAnimTrack.Looped = false
			SToSAnimTrack.Priority = Enum.AnimationPriority.Action
			SToSAnimTrack:Play()
			SToSAnimTrack.Stopped:wait()

		end
	end
end)

5 comments

0

Is this a local script?

0

Local script, correct

0

in my opinion it would be better to instead of creating a new animation that you clone one from ReplicatedStorage or ServerStorage

0

Maybe so, but I do not believe this would fix my issue. I am not available at my PC to test it though.

0

No, this did not end up fixing my issue, but I understand the practicality of doing this. Thanks for your advice Pitched.

1 answer

Hey guys:

My animation did work properly. The issue seemed to be that the animation was an R6 animation and I was on a R15 rig.

Thanks, Bees

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