title might not make sense :P
so ive got this script
script.Parent.ClickDetector.MouseClick:connect(function(player)
local leftMouseDown = true
player:GetMouse().Button1Up:connect(function()
leftMouseDown = false
end)
wait(1)
while leftMouseDown do
--Below needs to repeat every 2 seconds
local animationTrack = player.Character.Humanoid:LoadAnimation(script.FishingAnimation)
animationTrack:Play()
--Above needs to repeat every 2 seconds
player.leaderstats.Gold.Value = player.leaderstats.Gold.Value + 10
wait(math.random(1,10))
end
end)
ive got my animation that plays on repeat along with my give gold live which both repeat between every 1 to 10 seconds, problem is the the animation is only 2 seconds long, so if the wait is 3 seconds the animation stops for 1 second which i cant have...
so my question is how would i get the animation to repeat every 2 seconds no matter what and the gold + 10 to repeat every 1 to 10 seconds like it is now? if this is even possible
any and all help is appreciated thanks

1 comment
oh cool thanks for helping me out :)