Optimizing my figure eight pattern CFrame rotation script


Recently I helped someone out in #help-and-feedback:scripting-support by making a nightclub laser script that rotated an emitter in the pattern of a figure eight.

I went through multiple renditions of the code before I settled on that pattern, so there are some unnecessary vestiges, and the maxRotation variable which was supposed to be configurable really isn’t.

I was more interested in finding a cleaner way to rotate the CFrame in the pattern of a figure eight than anything else. How would you guys do that? :slight_smile:

You can find the code and the model download link on the help thread:

I’ll upload the model here too: Nightclub Laser.rbxm (4.5 KB)

1 Like