How can I rotate an Image GUI along the y axis

So as far as I know, the only way I can rotate an image is this script:

Spinny = script.Parent

while true do
	wait()
	Spinny.Rotation = Spinny.Rotation +1
end

For reference, this is the way I’m trying to rotate the image:

If knows how to rotate an image gui in this way, I would be very grateful

4 Likes

You’ll probably want to use a tween to do that. It’s pretty simple, and will work on both a part or UI (IDK what u really want to do since you say UI but that video is of a part). I’d begin by researching tween and going from there.

1 Like

I said the part is a representation of the way I want the image gui to rotate

2 Likes

Will the UI be double sided or have four sides like the part?

1 Like

I guess I should’ve worded this better: The image is on a part right? Just one image. The image will rotate the same way I have rotated the part, as in rotate along the y axis and not the x axis

2 Likes

sort of like this

3 Likes

@ComplicatedParadigm @TallestSenator
I think most simplest way most people would achieve this “effect / illusion” would be to
Tween the Y size of the Ui from top to bottom then
Position the Ui at the top of the start position
then repeat

i.e.
local Tween = game:GetService(“TweenService”)
local Ui = script.Parent:WaitForChild(“UI”)

Ui.Size = UDim2.new(1, 0, 1, 0)
UI.Position = UDim2.new(0.5, 0, 0.5, 0)

repeat wait(0.5)
local tw = Tween:Create(Ui, TweenInfo.new(0.3), {Size = UDim2.new(1, 0, 0, 0)} tw:Play() tw.Completed:Wait()

Ui.Position = UDim2.new(0.5, 0, 1, 0)

local tw2 = Tween:Create(Ui, TweenInfo.new(0.3), {Size = UDim2.new(1, 0, 1, 0)} tw2:Play() tw.Completed:Wait()

until nil

note: i havent tested this at all and it’s just my guess of how it might be initiated

3 Likes

oh, lol you said y axis so I thought… nvm
just replace where the y is changed to x so instead of the size being set to UDim2.new(1,0, 0,0)

change it to UDim2.new(0,0,1,0)
and so fourth

or use VPF (Viewport Frames)
and rotate the camera around the part in the vpf, that should work even better!

a way would be have a thin part in a viewport frame and that thin part would have your image that you want on both sides then you can rotate the thin part to get the effect you want

1 Like