I’m making an obstacle course, and I’m using CFrame a lot to give it that “original” and “fun” affect. Unfortunately, lag and performance is always an issue. I have around 10 scripts like this in my game, and I’m wondering what are better and working solutions to this.
My script currently rotates a part on the Z-axis at .075
speed using CFrame.fromEulerAnglesXYZ()
. This is done within an infinite while loop, however, this is not the best practice and I was wondering if anyone knew how to resolve the lag issue.
Script:
spawn(function()
while wait() do
script.Parent.CFrame = script.Parent.CFrame * CFrame.fromEulerAnglesXYZ(0,0,0.075)
end
end)
Video: