Hello, i’m trying to make an animation where the user swings a bat when they click the screen but it seems to be “freezy” or, well, buggy. I’m using moon animator, by the way.
What do you want to achieve?
I’m trying to make an animation that plays when the user clicks the screen, it’s as simple as that lol
What is the issue? Include screenshots / videos if possible!
The animation appears to be freezy, laggy and just bad in general. This only happens when the animation is played from the player, as the rig animation works just fine.
The script, if needed:
local tool = script.Parent
local handle = tool:WaitForChild("bat")
local idleAnim = tool:WaitForChild("idle")
local useAnim = tool:WaitForChild("use")
local character = nil
local humanoid = nil
local rightArm = nil
local animator = nil
local idleTrack = nil
local useTrack = nil
local w = nil
local hasEquipped = false
tool.Equipped:Connect(function()
if not hasEquipped then
hasEquipped = true
character = tool.Parent
humanoid = character:FindFirstChildWhichIsA("Humanoid")
rightArm = character["Right Arm"]
animator = humanoid:FindFirstChildWhichIsA("Animator")
idleTrack = animator:LoadAnimation(idleAnim)
useTrack = animator:LoadAnimation(useAnim)
end
idleTrack:Play()
local weld = Instance.new("Motor6D", rightArm)
weld.Name = tool.Name
weld.Part0 = rightArm
weld.Part1 = handle
w = weld
end)
tool.Unequipped:Connect(function()
idleTrack:Stop()
w:Destroy()
end)
tool.Activated:Connect(function()
useTrack:Play()
end)
What solutions have you tried so far?
Looked on the forum, searched for tutorials and i tried remaking the animation 3 times too. This issue doesn’t seem to happen with other tools, where their animation is played correctly even if i’m using the same scripts and methods to make both animations.
Since it’s only happening with the bat anims i don’t really know how to fix it as i tried many times. Any help?