Universal Script πŸ“Œ
902 Views
32 Executions

CustomAnimation

Universal Script πŸ“Œ
zxrealm
zxrealmPublished 10
1 year ago
Get an executor
Please login to perform these actions:

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

--Change the anims Need change animID to use!

View Raw
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()


Comments

1
Log in to join the conversation. Login
zxrealm's profile picture
zxrealmUploader1 year ago

You need change animation ID to use.

1

More universal scripts

See all
Script hub
139
986
Bumped 25 minutes ago

Script hub

Lunyx Hub

Script hub
120.8k
221.2k
Bumped 44 minutes ago
Key System
Script hub
10.5k
200.6k
Bumped 1 hour ago

Script hub

KeylessVerified script badgeIRIDIUM HUB | #1

Script hub
33.3k
299.2k
Bumped 4 hours ago
Script hub
23.7k
5.3k
Bumped 4 hours ago
Key System
Paid
High QualityΒ Offering
Universal Script πŸ“Œ
304
977
Bumped 4 hours ago