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

How to stop the default on certain parts?

Asked by
chafava -113
4 years ago

I made a tool hold animation and it works, but how do I stop the default animations from playing on certain body parts to stop the default Roblox animations, add it on to this code of mine!

local player = game:GetService("Players").LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")

local animaton = script.Parent.Animation
local work = humanoid:LoadAnimation(animaton)
local Tool = script.Parent

Tool.Equipped:Connect(function(mouse, player)

    work:Play()
end)
0
work:Stop() StormcloakGuard 30 — 4y
0
^ he said defualt Fad99 286 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

I'm assuming ROBLOX Animation's are overriding your 'work' animation.

You need to set your animation priority to an 'Action' as well as turn looping on (since it's a holding animation) in order for it to play on top of ROBLOX's Animation.

https://developer.roblox.com/api-reference/enum/AnimationPriority https://developer.roblox.com/articles/using-animation-editor#priority

Ad

Answer this question