Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Could someone explain to me in simpler terms how to put animations into games?

Asked by 5 years ago

Please include the code which you are trying to use, so the community will be better-equipped to help you with your problem.

This is the link for the Dev Wiki I tried, I have no idea what to do: https://developer.roblox.com/en-us/articles/using-animations-in-games. I have the animations for what I want but I just can't make sense of the wiki. I just want to replace the default animations with my own custom ones, I tried inserting scripts from the wiki with my animation code but that didn't change anything. I'm relatively new to scripting and animating and might not understand much about them but I'd like for someone to explain how to replace the default animations with the ones I made. I am also pretty confused with my "weight" of animations and having multiple animations. Thanks, I think there are a lot of people on here who have the same question and I hope the answer will help some people!

1 answer

Log in to vote
1
Answered by 5 years ago

this should work

local player = game.Players.LocalPlayer
wait(1)
local animate = player.Character:WaitForChild("Animate")

local run = (your run id)
local walk = (your walk id)
local idle1 = (your idle id)
local idle2 = (your idle id) -- add your ids here (make sure you remove the brackets)

animate.run.RunAnim.AnimationId = "rbxassetid://run"
animate.walk.WalkAnim.AnimationId = "rbxassetid://walk"
animate.idle.Animation1.AnimationId = "rbxassetid://idle1"
animate.idle.Animation2.AnimationId = "rbxassetid://idle2"

this example i only set 4 animations but you can add more

0
Make sure you put it in a local script in StarterGui or StarterPlayer DalekAndrew99 20 — 5y
0
also i don't think you need to add weight to them DalekAndrew99 20 — 5y
Ad

Answer this question