Mhm! I’ll be sure to update that.
This is super sick! Definitely once i get back to not doing commissions I’ll fiddle around doing these kinds of things.
Don’t forget to use deltaTime
!
e.g.
local speed = 1 -- Revolutions per Second
game:GetService("RunService").Heartbeat:Connect(function(deltaTime)
script.Parent.UIGradient.Rotation += (speed*deltaTime*360)
end)
Correct me if I’m wrong but that code seems to be creating a new tween every heartbeat. There’s a good chance that can cause a memory leak. It seems a little unnecessary when you can use TweenService’s built in method of looping the tween to achieve a very similar effect.
local currentrot = script.Parent.UIGradient.Rotation
local TweenService = game:GetService("TweenService")
local TweenInfo = TweenInfo.new(2, Enum.EasingStyle.Quint,
Enum.EasingDirection.In,-1,true)
local Goal = {Rotation = currentrot + 360}
local Tween = TweenService:Create(script.Parent.UIGradient, TweenInfo, Goal)
Tween:Play()
Oh yeah, I’ll be updating that code in a bit. Thanks!
Nice contribution, but there’s something I need to remind of, you didn’t do the border properly.
Here’s a tutorial teaching you the correct way to create a consistent border for UI that has rounded corners.
Great tutorial! I would recommend to also explain the script, since most people that need this tutorial are most of the time beginners and would also like to know how the script works, that way they get a better understanding of Lua.
Really detailed, Ill see if I can do it myself
Mhm! I was trying to do the same type of border but in Roblox.
To add onto this, Roblox does do a similar thing if you look at the page via the inspect tool
Great and unique tutorial! Will bookmark
By the way, congrats on your cake day!
does the code work with any gradient?
Yes it does! If you need assistance adding it, feel free to respond to this post!
is there a way to do this with letters?
I think so, not 100% sure. You can just insert a UIGradient and the script in it, not too sure if it will work.
nice job, I will b sure to use somthing like this in the future
This is so clean! Keep up the good work.
Yes, however, I’m pretty sure that’s a beta thing, so I did it without the Beta if anyone doesn’t want to enable it.