I’m having problems with the default animate script roblox gives you. How can I go about making my own? I have all animations ready. The problem or road block I hit was playing them correctly. Say the player is “Idle” play that animation or if they’re moving then do that walk animation, but I cant seem to get it to work properly. Thanks.
This is what I have at the moment:
local animationsFolder = script:WaitForChild("Animations")
local movementAnimationsFolder = animationsFolder:WaitForChild("Movement")
local character = script.Parent
local humanoid = character:FindFirstChildOfClass("Humanoid")
local player = game:GetService("Players"):GetPlayerFromCharacter(character)
local pose = ""
local currentAnimTrack = nil
function playAnimation(anim, transitionTime)
currentAnimTrack = humanoid:LoadAnimation(anim)
currentAnimTrack.Priority = Enum.AnimationPriority.Movement
currentAnimTrack:Play(transitionTime)
end
playAnimation(movementAnimationsFolder.Idle)