Basically each time you click this GUI, a table rotates. But if you keep clicking it it will break. Any ideas why, and how to fix?

	local x1, y1, z1 = tabel.Base.CFrame:toEulerAnglesXYZ()
			
			
			if e <360 then
				e = e + 22.5
				else
				e = 0
				print("'e' Was reset")		
			end
			tabel:setPrimaryPartCFrame(tabel.Base.CFrame*CFrame.Angles(x1*-1, y1*-1, z1*-1)*CFrame.Angles(0, math.rad(e), 0))

5 comments

0

Is this the entire code, or just a chunk? Because your code is tabbed incorrectly. :P

0

Just a section+ Tabbing doesn't really matter

1

Please supply the full code, and yes tabbing does matter. Makes it a lot easier to debug, and you can tell where you need ends easily.

0

What do you mean by "break"?

0

nvm solved myself