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

プレイ中のアニメーションを止める

for i, track in pairs (humanoid:GetPlayingAnimationTracks()) do track:Stop() end

参考

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

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