local player = game.Players.LocalPlayer
local character = player.Character
repeat wait()
character = player.Character
until character
local hum = character:WaitForChild("Humanoid")
playing = false
script.Parent.Play.MouseButton1Click:connect(function()
script.Parent.Emote.AnimationId = "rbxassetid://"..script.Parent.AssetId.Text
if playing == false then
local emote = hum:LoadAnimation(script.Parent.Emote)
emote:Play()
playing = true
script.Parent.Play.Text = "Pause"
elseif playing == true then
local emote = hum:LoadAnimation(script.Parent.Emote)
emote:Stop()
playing = false
script.Parent.Play.Text = "Play"
end
end)
its does not play animation(not showing any error)
local player = game.Players.LocalPlayer
local character = player.Character
repeat wait()
character = player.Character
until character
local hum = character:WaitForChild("Humanoid")
playing = false
script.Parent.Play.MouseButton1Click:connect(function()
script.Parent.Emote.AnimationId = "rbxassetid://"..script.Parent.AssetId.Text
print(script.Parent.Emote.AnimationId)
if playing == false then
local emote = hum:LoadAnimation(script.Parent.Emote)
emote:Play()
playing = true
script.Parent.Play.Text = "Pause"
elseif playing == true then
local emote = hum:LoadAnimation(script.Parent.Emote)
emote:Stop()
playing = false
script.Parent.Play.Text = "Play"
end
end)
local player = game.Players.LocalPlayer
local character = player.Character or player.Character:Wait()
local hum = character:WaitForChild("Humanoid")
playing = false
local emote
script.Parent.Play.MouseButton1Click:connect(function()
script.Parent.Emote.AnimationId = "rbxassetid://"..script.Parent.AssetId.Text
emote = hum:LoadAnimation(script.Parent.Emote)
print(emote)
if playing == false then
emote:Play()
playing = true
script.Parent.Play.Text = "Pause"
elseif playing == true then
emote:Stop()
playing = false
script.Parent.Play.Text = "Play"
end
local player = game.Players.LocalPlayer
local character = player.Character or player.Character:Wait()
local hum = character:WaitForChild("Humanoid")
playing = false
local emote
script.Parent.Play.MouseButton1Click:connect(function()
script.Parent.Emote.AnimationId = "rbxassetid://"..script.Parent.AssetId.Text
emote = hum:LoadAnimation(script.Parent.Emote)
print(emote)
if playing == false then
emote:Play()
playing = true
script.Parent.Play.Text = "Pause"
elseif playing == true then
emote:Stop()
playing = false
script.Parent.Play.Text = "Play"
end
end)
Asset IDs differ from animation IDs. An asset ID is shown on the URL, not an animation ID.
Is there a way to obtain the animation ID from a Roblox asset? The answer is yes.
Using insertservice, you can import the asset into your game and see the animation immediately! From there, you can use the anomation ID.
What is the process for adding the insertservice to the system?
Since insertservice cannot be used in client scripts, we will add an event that fires whenever the player wants to play an animation. As a result, the Server script inserts the model and gives it to the client. Afterwards, the client’s function continues.
i have 1 question
can we pause player live animation(so player animation stop in his pose)
if we pause animation it was stop animation but in pose (character live animation walk/swim/jump also stop in pose)