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

Why aren't my animations playing when I upload my game to ROBLOX?

Asked by 9 years ago

So I have this animation script. It is in a local script, and the local script is under a tool. The script works fine in studio, but then once i upload my game to roblox, the animation doesn't seem to play. Help!

local tool = script.Parent local player = game.Players.LocalPlayer local animationtrack local animationtwo = tool.Folder.Animation2 local sound = tool.Sound

local debounce = false

tool.Activated:connect(function() if debounce == false then debounce = true local c = player.Character local h = c:WaitForChild("Humanoid") animationtrack = h:LoadAnimation(animationtwo) animationtrack:Play() sound:Play() wait(.7) animationtrack:Stop() wait(.2) debounce = false end end)

tool.Unequipped:connect(function() animationtrack:Stop() end)

3 answers

Log in to vote
0
Answered by 9 years ago

I'm sorry here's the code...

01local tool = script.Parent
02local player = game.Players.LocalPlayer
03local animationtrack
04local animationtwo = tool.Folder.Animation2
05local sound = tool.Sound
06 
07local debounce = false
08 
09tool.Activated:connect(function()
10    if debounce == false then
11    debounce = true
12    local c = player.Character
13    local h = c:WaitForChild("Humanoid")
14    animationtrack = h:LoadAnimation(animationtwo)
15    animationtrack:Play()
View all 26 lines...
0
You know you can edit the original question, right? M39a9am3R 3210 — 9y
Ad
Log in to vote
0
Answered by 9 years ago

What i do is Check for the Humanoid and the Animation

01local tool = script.Parent
02local player = game.Players.LocalPlayer
03local animationtrack
04local animationtwo = tool.Folder.Animation2
05local sound = tool.Sound
06 
07local debounce = false
08 
09tool.Activated:connect(function()
10    if debounce == false then
11    debounce = true
12    local c = player.Character
13    local a = tool.Folder:FindFirstChild('Animation2')
14    local h = c:FindFirstChild("Humanoid")
15    if a and h then
View all 31 lines...
0
I did the check yet it still doesn't work. swimmaster07 25 — 9y
Log in to vote
0
Answered by
Dr_Doge 100
9 years ago

Have you tried buying the anamation? From my experience, If the animations not made by Roblox then the game owner needs to own it for it to work. Go to the library and click on a random model, then replace the ID with the anamation ID.

Tell me if this worked.

0
yes when i do this it shows my animation. swimmaster07 25 — 9y
0
you gunna help or naw?! swimmaster07 25 — 9y

Answer this question