You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I want to add a running animation to the player so that when they walk around, the animation will play. -
What is the issue? Include screenshots / videos if possible!
The script that I have is not working in my game. However if I put it in an empty baseplate, it works. This code is in a localScript. -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Searching around the web, discord, asking friends, etc.
wait(8)
print("gl")
local animate = game.Players.LocalPlayer.Character:FindFirstChild("Animate")
local walk = animate.walk
local run = animate.run
if not walk:FindFirstChild("PreviousAnimation") then
local newVal = Instance.new("StringValue")
newVal.Value = walk.WalkAnim.AnimationId
newVal.Name = "Previous"
newVal.Parent = walk
end
walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=6084665257" --run animaation.
if not run:FindFirstChild("PreviousAnimation") then
local newVal = Instance.new("StringValue")
newVal.Value = run.RunAnim.AnimationId
newVal.Name = "Previous"
newVal.Parent = run
end
run.RunAnim.AnimationId = "http://www.roblox.com/asset/?id=6084665257" --run animaation.
How can I fix this?