while true do shouldn’t have that big of a difference if not none compared to task.wait() from what I’ve been told its what’s inside the code that matters. I believe task.wait() just waits for the next frame until it starts.
–Edit: Granted you have some wait between the loops. Sorry its very late… or early.
I want the animation to completely stop when I turn Auto Click off but it seems to keep or wanting to keep going when I stop it
Ah okay, my apologies. Yes you are right, it does depend on what it is in. I didn’t think about that in the moment! Not to mention, you do have a wait() in the while true do loop.
How does Auto Click work in your game? Does it play an animation constantly if the tool is equipped or does it change WaitTime?
Well, are you able to show more of your script? From what I understand, while true do will make it keep continuing even though the variable is true or false. This could be the reason why it is bugging out.
I apologize, it does break out eventually, but after that, the animation starts spasming. Here is the full code to clarify things a bit more.
while LocalVariablesDataFolder:GetAttribute('AutoClick') do
local WeightSpeedVariable = LocalMultipliersDataFolder:GetAttribute('Speed')
AnimationTracksTable['Weight_Action']:Play()
AnimationTracksTable['Weight_Action']:AdjustSpeed(tonumber(WeightSpeedVariable))
wait(ReturnTick(LocalCooldownsDataFolder:GetAttribute('Weight')) - tick())
end
Okay, yk what… you were right… I did forget to exit the loop. BUT it was from not changing the attribute on the folder LMAO I’m so sorry for the trouble.