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

Why cant I play my animation?

Asked by
neoG457 315 Moderation Voter
8 years ago
local Player = game.Players.LocalPlayer 
local Mouse = Player:GetMouse()
Mouse.KeyDown:connect(function(key)
if key == "x" then

local Test = Instance.new("Animation")
    Test.AnimationId = "http://www.roblox.com/Asset?ID=276753163"
local animController = BikakuModel2.AnimationController
animController.Parent = BikakuModel2

local animTrack = animController:LoadAnimation(Test)
animTrack:Play()

I'm trying to play an animation in my model however it doesn't work despite the fact that I believe I've set up my model with Motor6D Parts correctly along with an AnimationController as seen in the code above.

1 answer

Log in to vote
-1
Answered by 8 years ago
local Player = game.Players.LocalPlayer 
local Mouse = Player:GetMouse()
Mouse.KeyDown:connect(function(key)
if key == "x" then

local Test = Instance.new("Animation")
    Test.AnimationId = "http://www.roblox.com/Asset?ID=276753163"
local animController = BikakuModel2.AnimationController
animController.Parent = BikakuModel2

local animTrack = animController:LoadAnimation(game.StarterPack.Test) -- You didn't tell the script where the animation was (I'm new at scripting)
animTrack:Play()

0
I fixed it myself but I'll upvote anyway. neoG457 315 — 8y
0
So was I correct? james24dj 90 — 8y
Ad

Answer this question