Alright so, I am wondering why my animation looks so weird when I apply it to my player, but it looks just fine inside of the editor? Here is a gif of how it looks in editor, how it looks in gameplay, aswell as a screenshot of my script that I am using to apply the animation. I am almost completely lost. Thanks!
Editor: https://gyazo.com/2325b5fabed343bad2dac778bb3b9c5a
In-game: https://gyazo.com/4e017d420be4d5306deb67072edcb9e6
Script: https://imgur.com/a/5XEUUJ5
1 Like
Infi_power
(Infi_power)
December 8, 2020, 9:51am
2
You can use this code which I got it from this website: Using Animations | Documentation - Roblox Creator Hub
Put this code into normal script, and put that script into ServerScriptService. And don’t forget to replace the animation IDs.
local Players = game:GetService("Players")
local function onCharacterAdded(character)
local humanoid = character:WaitForChild("Humanoid")
for _, playingTracks in pairs(humanoid:GetPlayingAnimationTracks()) do
playingTracks:Stop(0)
end
local animateScript = character:WaitForChild("Animate")
animateScript.run.RunAnim.AnimationId = "rbxassetid://616163682" -- Run
animateScript.walk.WalkAnim.AnimationId = "rbxassetid://616168032" -- Walk
animateScript.jump.JumpAnim.AnimationId = "rbxassetid://616161997" -- Jump
animateScript.idle.Animation1.AnimationId = "rbxassetid://616158929" -- Idle (Variation 1)
animateScript.idle.Animation2.AnimationId = "rbxassetid://616160636" -- Idle (Variation 2)
animateScript.fall.FallAnim.AnimationId = "rbxassetid://616157476" -- Fall
animateScript.swim.Swim.AnimationId = "rbxassetid://616165109" -- Swim (Active)
animateScript.swimidle.SwimIdle.AnimationId = "rbxassetid://616166655" -- Swim (Idle)
animateScript.climb.ClimbAnim.AnimationId = "rbxassetid://616156119" -- Climb
end
local function onPlayerAdded(player)
player.CharacterAppearanceLoaded:Connect(onCharacterAdded)
end
Players.PlayerAdded:Connect(onPlayerAdded)