so i’m trying to make something like the roblox the classic collectible animation, but the default animations that i took from the animate script dont work as intended. any clue on how to fix this?
local remote = script.RemoteEvent
local character = game:GetService("Players").LocalPlayer.Character
remote.OnClientEvent:Connect(function()
character.Humanoid.Jump = true
task.wait(0.05)
repeat task.wait() until character.Humanoid.FloorMaterial ~= "Air"
local animation = Instance.new("Animation")
animation.AnimationId = "http://www.roblox.com/asset/?id=182436935"
local track = character.Humanoid.Animator:LoadAnimation(animation)
track:Play()
end)
What happens if you load the animation into the player in their client (where animations run properly) when they begin the game. Then just play it in your script instead of loading it every time it’s needed and possibly causing lag there.
Are you stopping the previously playing animation (walk, idle, etc)?
can you clarify? what do you mean by loading into the player in the client? these are good ideas and all but i think u are talking about optimization, im just trying to get the code to work and then optimize it later down the line
Mark your post where you solved it as the Solution so that others will see the answer you gave if they have the same problem.
It may help them out, and other people won’t keep trying to solve it because a lot of people only read the first post.