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

could i have some help with the eating animation with tool/food in hand?

Asked by 7 years ago

So. me and a group are making a restaurant game but i want it that if the player has the food they click the left mouse. And the animation only plays if the burger is in hand. But the animation doesn't move. here is the script:

01local animation = Instance.new("Animation")
02animation.AnimationId = "https://www.roblox.com/Asset?ID=1069941509"
03 
04local trackanimation = nil
05local playability = true
06function playAnimation(AnimationSource)
07    if playability == true then
08        local plr = game.Players.LocalPlayer
09        trackanimation = plr.Character.Humanoid:LoadAnimation(animation)
10 
11        trackanimation.KeyframeReached:connect(function()
12            print ('Working')
13        end)
14        trackanimation:Play()
15    end
View all 27 lines...

is something wrong about it?

0
Well. It does work so it wont play without the food. but the animation wont play when there is a tool and its hand Mohawkid14 28 — 7y
0
all it does it that it only play animation when you un-equip it Mohawkid14 28 — 7y
0
If you used normal Roblox Animation editor then the plugin will ignore tools and your hand with the tool will be frozen Lolamtic 63 — 7y
0
So I have to use a different animation editor? Mohawkid14 28 — 7y
View all comments (3 more)
0
No, the ROBLOX animation editor works perfectly fine. Make sure when you're creating the animation that you only have the selected limbs that you're using. Also, just be sure your tool is also anchored (I doubt you left it anchored but I might as well mention it). Troidit 253 — 7y
0
i have anchored it, the animation won't move with tool. all i need is the animation to move with the tool equipped. Mohawkid14 28 — 7y
0
is my script wrong? Mohawkid14 28 — 7y

Answer this question