You can write your topic however you want, but you need to answer these questions:
What do you want to achieve?
I want my animation to play in roblox
What is the issue?
Animation only playing in studio
What solutions have you tried so far?
I looked for solutions to this but sadly most of them are because the animation was not made under the group
My script:
local uis = game:GetService("UserInputService")
local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local hrp = char:WaitForChild("HumanoidRootPart")
local key = Enum.KeyCode.Q
local debounce = false
local hum = char:FindFirstChild("Humanoid")
local animator = hum:WaitForChild("Animator")
local dash = Instance.new("Animation")
dash.AnimationId = "rbxassetid://17801920491"
local animation = animator:LoadAnimation(dash)
local dash2 = Instance.new("Animation")
dash2.AnimationId = "rbxassetid://17802237793"
local animation2 = animator:LoadAnimation(dash2)
local currentdash = 1
local distance = 2
uis.InputBegan:Connect(function(input,chat)
if chat then return end
if input.KeyCode == key then
if debounce == true then return end
debounce = true
if math.round(currentdash%2) == 1 then
animation2:Play()
else
animation:Play()
end
currentdash += 1
animation:AdjustSpeed(1.9)
animation2:AdjustSpeed(1.9)
for count = 20,0,-1 do
local detect = Instance.new("Part")
detect.Size = Vector3.new(1,1,1)
detect.Parent = workspace
detect.CanCollide = false
detect.Anchored = true
detect.CFrame = hrp.CFrame * CFrame.new(0,0,distance * -1)
local area = detect:GetTouchingParts()
if #area == 0 then
hrp.CFrame = hrp.CFrame * CFrame.new(0,0,distance * -1)
else
hrp.CFrame = hrp.CFrame * CFrame.new(0,0,distance * 2)
end
detect:Destroy()
task.wait()
end
debounce = false
end
end)
The animations are published under my name and the game is published by me
Animations aren’t moderated. Only the names and descriptions are screened. There seems to be a misconception that it does get moderated but that was when uploading animations were new.
How long ago animations are uploaded does not affect whether they work in the game. I have animations uploaded many years ago, probably older than some players on the platform and they load and work instantly in the game.
For OP, check if there are any errors in-game (you can see them by pressing F9 to open the Developer console). Sometimes the studio environment is different and there may be hidden errors that only propagate in the actual game. Also, look for something like “Failed to load animation/asset” with IDs similar to those given in the script. Should tell you what’s going on.
For the record thats not what I meant at all, the newer they are for some reason just seem not to work is what I was saying, Idk if its just me but thats how it is for me at least, and yeah it being moderated was the only thing I thought could be going on so thats what I said (probably shouldnt do that again lol).
Personally, I’m not a big fan of playing animations through the client.
So instead, how about we take a different approach to our situation?
First, we create a RemoteEvent in ReplicatedStorage.
We then create a script in ServerScriptService which is in charge of handling the animation.
Let’s also create an animation object in ReplicatedStorage. This animation object will also have our animation ID.
Now in your script in ServerScriptService, put this in:
local ReplicatedStorage = game:GetService("ReplicatedStorage");
local animation = ReplicatedStorage.Animation;
local remote = ReplicatedStorage.RemoteEvent;
remote.OnServerEvent:Connect(function(plr)
if not plr then return end;
local Character = plr.Character;
local Animator = Character.Humanoid.Animator;
local AnimationTrack = Animator:LoadAnimation(animation);
AnimationTrack:Play()
return
end)
Now, this is interchangeable to your liking. Be aware that you may have to make a function for separate animations.
In your localscript, we can replace the animations being called with:
RemoteEvent:FireServer();
So, how should this help?
Well, when you play an animation through the client, it often bugs out when it tries to be replicated to the server. This ensures that the animation is played through the server instead, which includes the speed it’s adjusted to.