How to animate gui

Hi,
I dont know if this is question for this category, but i think, i need to use script, so it is best category.
I need to make animated gui, like there is some picture that is rotating,… And is this possible to make as default gui, when using teleport service?

3 Likes

You can increment the Rotation property of the GUI object with BindToRenderStep to give it a auto-rotation effect.

Example:

local GUIObj = guiobjhere

local INCREMENT_VALUE = 0.1

game:GetService("RunService"):BindToRenderStep("GUI Rotation", Enum.RenderPriority.Last.Value, function()
	GUIObj.Rotation = GUIObj.Rotation + INCREMENT_VALUE
end)

Hope this helps!

2 Likes

If I am understanding your question correctly you can use TweenService to ‘animate’ guis. Then to make a gui object rotate you can use the rotation property.

And can i implement this to custom loading screen, because hub is saying this:
“A customLoadingScreen argument can be specified. This is a ScreenGui that is copied (without scripts) into the CoreGui of the destination place.”

By using TeleportService:SetTeleportGui() you can set what you want the loading screen to be, then in the next place you’ll need to fetch the gui using TeleportService:GetArrivingTeleportGui() and parent it to their PlayerGui.

Remember these can only be used on the client.


When you’ve parented the arriving teleport gui, you could add a rotation effect to it.

Unfortunately, you are only permitted to make static teleport guis (no scripts, no animations, nothing). Any animations ran on the Gui beforehand will not transfer over or show during a teleport.

In terms of setting it, you can either pass the ScreenGui as an argument to a teleport method or use the below method. The below method of SetTeleportGui is more recommended over passing it as an argument.

3 Likes

So i cant make something as the default gui, where roblox logo rotate.

No, that is not possible. It would honestly be great if it was but I could probably understand why it’s not allowed, especially with the whole script thing. Double that over with the fact that we can’t access CoreGui.

1 Like