I currently have a part that grows in size as long as the player has their mouse button held down/clicked.
I am currently using a for loop that incrementally adds 0.1 to the size.
So, something like this:
for i = 1,1000 do --the max size is 1000*0.1, hence the end value 1000
if mouseButton1Down == false then
break
end
size = size + 0.1
wait()
end
(I know that the code above is not ideal, but you get the picture…)
However, instead of adding the size property, would it be better to use tweenservice?
My idea with tweenService would be:
Have an animation that grows to the max value, but when the mouse button is released we do animation:Cancel()
I think using tweenservice might be the best solution.
Your ideas?