I put it in a script that is located in one of my group games and it will still not play? The animation ID changes but will not play. Here is my script:
local workspacePlr = game.Workspace.MithrilSlate
local humanoid = workspacePlr:FindFirstChild("Humanoid")
local animate = workspacePlr: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=6246381291" --run animaation.
local loaadAnimation = humanoid:LoadAnimation(walk.WalkAnim)
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=6246381291" --run animaation.
loaadAnimation = humanoid:LoadAnimation(run.RunAnim)
local workspacePlr = game.Workspace.MithrilSlate
local humanoid = workspacePlr:FindFirstChild("Humanoid")
local animator = humanoid:FindFirstChildOfClass("Animator")
local animate = workspacePlr: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=6246381291" --run animaation.
local loaadAnimation = animator:LoadAnimation(walk.WalkAnim)
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=6246381291" --run animaation.
loaadAnimation = animator:LoadAnimation(run.RunAnim)
Well my script actually works when I put it in an empty baseplate. However if I try to put it in my group game, it won’t play by itself unless I use :Play()
You need to do :Play() ok? But, if you’re animation is looped then you need to wait the amount of seconds that it takes for that animation to finish, and then do :Stop()!
Example:
anim:Play()
wait(12)
anim:Stop()
but with the amount of seconds that the animation takes to “end”;