Hello, can you please help me? Ive been trying to make an animation gui ( for rp game ) I tried testing them and they work perfectly in studio, but when i join the game they dont work.
Localscript in Emote textbutton.
local player = game.Players.LocalPlayer
local character = player.Character
repeat wait()
character = player.Character
until character
local hum = character:WaitForChild("Humanoid")
local emote = hum:LoadAnimation(script.Parent.Emote)
playing = false
script.Parent.MouseButton1Click:connect(function()
if playing == false then
emote:Play()
hum.WalkSpeed = 0
hum.JumpPower = 0
playing = true
elseif playing == true then
emote:Stop()
hum.WalkSpeed = 16
hum.JumpPower = 50
playing = false
end
end)
The difference between emote1 and all the rest of emotes, that i took it “ready” like a free model animation without any keyframes. The rest of the emotes i got using animation editor, and exporting them into roblox.
Only emote1 works ingame.
its cus ur using hum:Loadanimation, which is deprecated. Use animator:Loadanimtion
Learn more here:
here’s a simple script that uses it:
local Player = game.Players.LocalPlayer
local Humanoid = Player.Character:FindFirstChildWhichIsA("Humanoid")
if Humanoid then
local Animator = Humanoid:FindFirstChildOfClass("Animator")
if Animator then
Animator:LoadAnimation(Animation here)
end
end
I’m pretty sure it’s because you’re using Humanoid:LoadAnimation. WHICH IS DEPRECATED! I’ve had the same issue in the past and it was because I used Humanoid:LoadAnimation. And I fixed it by using animator:loadAnimation. If you want an example of a script using it then here you go:
local Player = game.Players.LocalPlayer
local Humanoid = Player.Character:FindFirstChildWhichIsA("Humanoid")
if Humanoid then
local Animator = Humanoid:FindFirstChildOfClass("Animator")
if Animator then
local Animation = Animator:LoadAnimation(Animation here)
Animation:Play()
end
end
Are you working for a group? This happened to me before, if you load the animation from your account you can see it, but not in the game, you must load it for the group.
This doesn’t seem to work for me. I have a group game and the animations are in the group.
They work perfectly in studio but doesn’t work ingame for anyone.
The place is privated so i’m wondering if that’s the reason