Answers for "roblox animation script"

5

how to play an animation roblox

local function PlayAnimation(character, animation)
	local humanoid = character:FindFirstChildOfClass("Humanoid")
	if humanoid then
		-- need to use animation object for server access
		local animator = humanoid:FindFirstChildOfClass("Animator")
		if animator then
			local animationTrack = animator:LoadAnimation(animation)
			animationTrack:Play()
			return animationTrack
		end
	end
end
Posted by: Guest on June-12-2021
1

how to amke a Playanimation script for roblox stuio

--Made by Rigby#9052
--Put The "Animation" in This Script & Then.
--Insert this into your character.
local hum = script.Parent:WaitForChild("Humanoid")
local anim = hum:LoadAnimation(script:FindFirstChildOfClass("Animation"))
anim.Looped = true
anim:Play()
Posted by: Guest on October-17-2020

Browse Popular Code Answers by Language