
887 Views
19 Executions
CustomAnimation
Universal Script 📌
zxrealmPublished 10
1 year ago
Please login to perform these actions:Does it work?
No reports yetNo reports yet. Tried it? Be the first to say.
Also noticed:
Description
--Change the anims Need change animID to use!
local customAnimations = {
idle = "rbxassetid://109588861949567",
walk = "rbxassetid://73166283667706",
run = "rbxassetid://90262411810193",
jump = "rbxassetid://123018049917489",
fall = "rbxassetid://86262606787923",
climb = "rbxassetid://100220637962728"
}
local Players = game:GetService("Players")
local function safeRun(fn)
local ok, err = pcall(fn)
if not ok then warn(err) end
end
local function setupCustomAnimations(character)
safeRun(function()
local humanoid = character:WaitForChild("Humanoid", 5)
if not humanoid then return end
local animator = humanoid:FindFirstChildOfClass("Animator") or Instance.new("Animator", humanoid)
local animateScript = character:FindFirstChild("Animate")
if animateScript then animateScript:Destroy() end
local animations = {}
for name, id in pairs(customAnimations) do
local anim = Instance.new("Animation")
anim.Name = name
anim.AnimationId = id
animations[name] = animator:LoadAnimation(anim)
end
local currentTrack = nil
local function playAnimation(name, looped)
if currentTrack then currentTrack:Stop() end
currentTrack = animations[name]
if currentTrack then
currentTrack.Looped = looped
currentTrack:Play()









You need change animation ID to use.