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

Changing custom animations. Why won't this work?

Asked by 7 years ago

So I was browsing around and I found a cool script that changes the default roblox animations such as the /e dance emotes, running & more. It works perfectly but I have a sprinting script and when I hold LShift I want it to change my animation. However the walking animation stays the same every time. I Hold shift. Though running still works. Here is my code. Can you tell me why nothing changes?

01local mouse = game.Players.LocalPlayer:GetMouse()
02local running = false
03 
04function getTool() 
05    for _, kid in ipairs(script.Parent:GetChildren()) do
06        if kid.className == "Tool" then return kid end
07    end
08    return nil
09end
10 
11 
12mouse.KeyDown:connect(function (key) -- Run function
13    key = string.lower(key)
14    if string.byte(key) == 48 then
15        running = true
View all 38 lines...

1 answer

Log in to vote
0
Answered by 7 years ago

Because the Animation ID for lines 26 and 30 are the same, but thats just from first glance.

0
bump Notpace 2 — 7y
Ad

Answer this question