scriptでアニメーションのサンプルコード【Roblox Studio】

local Players = game:GetService("Players")
 
local player = Players:FindFirstChild("Builderman")
 
local character = player.Character 
local humanoid = character:FindFirstChild("Humanoid")
 
local animation = Instance.new("Animation")
animation.AnimationId = "http://www.roblox.com/asset/?id=507771019" -- Roblox dance emote
 
local animationTrack = humanoid:LoadAnimation(animation)
animationTrack.Priority = Enum.AnimationPriority.Action

animationTrack:Play()
animationTrack.Stopped:wait()

参考

https://developer.roblox.com/en-us/api-reference/class/Animation

https://developer.roblox.com/en-us/articles/using-animations-in-games