#Issue with animation script.

8 messages · Page 1 of 1 (latest)

carmine shell
#

I made a local script that is supposed to change the default idle animation of an R6 character. And I tested it after uploading my animation, and it won't work. I cannot find out why.

-- Insert this LocalScript into StarterPlayer -> StarterPlayerScripts

-- Replace "ASSET_ID" with the ID of your desired animation
local ANIMATION_ID = "rbxassetid://15468645174"

local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")

-- Function to load and set custom idle animation
local function setCustomIdleAnimation()
-- Load the animation
local animation = Instance.new("Animation")
animation.AnimationId = ANIMATION_ID

-- Apply the animation to the Humanoid description
humanoid:LoadAnimation(animation)

-- Play the idle animation
humanoid:Move(Vector3.new(0, 0, 0))
humanoid:Move(Vector3.new(0, 0, 0))  -- This is to force the humanoid to reset the animation
humanoid:Move(Vector3.new(0, 0, 0))

end

-- Connect the function to set the custom idle animation
setCustomIdleAnimation()

crystal oakBOT
#

studio** You are now Level 1! **studio

blazing elbow
#

Chatgpt code

carmine shell
#

Yep it is.

#

Forgot to mention that sorry.

#

Made a ton of outside changes though after it was done. Still not working though, so I am closing the post.

dreamy gull
#

bro

#

do this