I created sword holding script. For a less than a second, hand are together but after, they seperate (as shown in the picture)
![image](//devforum-uploads.s3.dualstack.us-east-2.amazonaws.com/uploads/original/5X/f/6/f/b/f6fb1a956ae2f862e950ad28a514171e0a02d2cd.jpeg)
Heres the script
local player = game.Players.LocalPlayer
local humanoid = player.Character:FindFirstChild("Humanoid")
local Idleanim = humanoid:LoadAnimation(script.Parent.Idle)
script.Parent.Equipped:Connect(function()
Idleanim.Priority = Enum.AnimationPriority.Idle
Idleanim:Play()
end)
script.Parent.Unequipped:Connect(function()
Idleanim:Stop()
end)
Any idea what can cause this?
The animation wasn’t set to looped when you created it?
1 Like
No, it wasnt. May that be the reason its happening?\
This is because the animation priority is too low and it’s clashing with the default idle animation. You can read about them here: AnimationPriority | Documentation - Roblox Creator Hub
local player = game.Players.LocalPlayer
local humanoid = player.Character:FindFirstChild("Humanoid")
local Idleanim = humanoid:LoadAnimation(script.Parent.Idle)
script.Parent.Equipped:Connect(function()
Idleanim.Looped = true
Idleanim.Priority = Enum.AnimationPriority.Action
Idleanim:Play()
end)
script.Parent.Unequipped:Connect(function()
Idleanim:Stop()
end)
So, it should be fixed after bumping it up a few levels.
2 Likes
system
(system)
Closed
#5
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.