How do I script this type of visual effect?

I’m trying to create a tower defense simulator, but I can’t seem to figure out a clean way to create this type of effect that I would like to see, when placing towers:

How is this circular animation/tween being done? I assume much of it is in the client. Surface Gui?

1 Like

I assume it is just a invisible cylinder with a decal that is being rotated infinitely using the tween.Completed function

You can set Repeat to -1 in the TweenInfo and it’ll repeat forever without needing to restart it on completion.

Ik lol, but I don’t like doing that because it can get buggy and its hard to control (i.e. stop infinitely running on certain circumstances)

Could you just then :Destroy() the cylinder and perhaps use a debounce? I mean, you could use an if statement and a break.

It is still more efficient for me, but don’t get me wrong I do use -1 in certain tweens

I know it is the basic way, but at least its not over-complicated, instead simplified.

If you save a reference to the tween you used to play it, you can cancel and start it as you wish whenever you need to, so this certainly shouldn’t be an issue.