Visuals Going Mad When I Enable Rotation

Im Modifying Some Visuals And Trying To Make Them Spin But They Go Mad Every Time I Enable It

Without Spin:
robloxapp-20210218-1245482.wmv (646.0 KB)
Script:

local len = #panels
local max = 2500


local max8 = max/8;

RS.RenderStepped:connect(function(delta)
	local t = tick()
	local tempArr = {}	
	for image = 1,8 do 
		tempArr[image] = (t + image) * max8 % max
	end	
	for index = 1,len do 
		local temp2 = panels[index]
		for key, value in pairs(tempArr) do				
			temp2[key].Size = UDim2.new(0,value,0,value)
			--temp2[key].Rotation = value / 2
		end
	end
end)

With Spin:
robloxapp-20210218-1248178.wmv (974.1 KB)
Script:

local len = #panels 
local max = 2500


local max8 = max/8;

RS.RenderStepped:connect(function(delta)
	local t = tick()
	local tempArr = {}	
	for image = 1,8 do 
		tempArr[image] = (t + image) * max8 % max
	end	
	for index = 1,len do 
		local temp2 = panels[index]
		for key, value in pairs(tempArr) do				
			temp2[key].Size = UDim2.new(0,value,0,value)
			temp2[key].Rotation = value / 2
		end
	end
end)

As You Can See It Goes Off Screen It Is Not Supposed To Do This Why Is This?

https://developer.roblox.com/en-us/api-reference/property/GuiObject/ClipsDescendants says:

Note that GuiObject.Rotation isn’t supported by this property. If this or any ancestor GUI has a non-zero GuiObject.Rotation , this property is ignored and descendant GUI elements will be rendered regardless of this property’s value.

So you’re out of luck, sadly.

Unless you want to calculate the intersections with the screen and render the rectangles with four lines, which would be fun but overkill.

1 Like

Could i possibly pay you to make this?

Because I Lithely Have No Idea How To Do That And Also Would Doing That On A Large Scale Be Laggy?