Look at what I made!

RobloxStudioBeta_34YvizeJms


Edit: Added time since account created :>

17 Likes

I’ve been working on this since yesterday to improve my UI scripting & tweening.

4 Likes

Cool but I don’t see how this belongs in #help-and-feedback:scripting-support…

1 Like

I didn’t know where to put it, sorry!

1 Like

You can put it in #help-and-feedback:creations-feedback.

2 Likes

This is amazing! How did you do all this! Truly, I have been trying to figure out GUI, and this stuff is the kind of stuff I need.

3 Likes

You can check out these articles to get started: :+1:

2 Likes

That’s a good beginning, nice!

For the Hover button, I recommend putting the MouseLeave function inside of the MouseEnter function, since it can bug out your button and make it say “Hovered!” even though you moved your mouse away!

4 Likes

Well, for the hover I just used MouseEnter and MouseLeave, and :lerp().
For the count I used MouseEnter, MouseLeave, and just some simple count = count + 1.
For the tween I just used :TweenSizeAndPosition() aswell as some other incredibly easy things, and for the click color fade it uses :lerp().
Creation date & Time since creation are very easy to set up as they just use os and simple math

3 Likes

If you’d like me to give you the code for something I’d happily do so. (I’ll give you a complete explanation too)

1 Like

Totally optional to do transitions however you want, however I’d recommend using the universal tween method as you can tween the same properties and more, all at the same time.

I personally use my own tween function to make it easier to use *(because writing out the full tween function is a bit annoying to do and remember):

local T = game:GetService('TweenService')
function tween(o,t,l,s,d)
	s = s or Enum.EasingStyle.Linear
	d = d or Enum.EasingDirection.InOut
	local i = TweenInfo.new(l,s,d)
	return T:Create(o,i,t)
end
tween(<instance>,<property dictionary>,<tween time>,<tween style [optional]>,<tween direction [optional]>)
tween(part,{Transparency=1,Color=Color3.new()},3):Play()
1 Like

I’m sorry, this is so confusing since I’m extremely new to programming & just barely know UIs

1 Like

I didn’t mean to overwhelm you, my apologize. You don’t need to use it if it’s too much right now.

But I’ll try to explain it anyway. The code at the top isn’t something you need to understand for it to work, it’s just defining the function. The middle code shows that type of datatype you’d put there. The bottom code is an example of how it would look with actual code.

So for tweening a frame, for example, it would be something like:

tween(frame,{Size=UDim2.new(.5,0,.5,0)},1.5):Play()

But again, don’t feel like you need to do anything like this just yet. Though if you do have any specific questions, feel free to ask. :+1:

1 Like

That piece of code looks evil. Seriously though, what’s a datatype and how do I configure it?

1 Like

A datatype is like a value of sorts. If you look at any instance, you’ll see a property called “ClassName”. Every object within the explorer is an instance. There are also values like numbers, strings, and some slightly more complex ones like Vector3, UDim2, or even Enums and arrays. Basically, it just means the type of value you pass through.

A function is like a variable, but for chunks of code. Here’s an example of defining a function:

function myCustomPrintFunction(thingToPrint)
	print(thingToPrint)
end

myCustomPrintFunction('hello world')

Output:

hello world

Pretty useless function, but that’s just an example of how you’d write one.

2 Likes

So in said function, thingToPrint would be the datatype?

1 Like

Well the datatype is a string, because text is a string value.
thingToPrint is just the argument or variable.

So when calling the function, I put the string value of hello world. That then got passed to the actual function. Now you can have any number of arguments, and they’ll show up in the order you wrote them in. So thingToPrint becomes the string value of hello world.

Feel free to DM me if you have any other questions (so we don’t clutter this thread too much).

2 Likes

I’ve never heard of :lerp() I will have to learn it! Thank you.

2 Likes

Here’s a quicky: :lerp() returns a Color3 interpolated between two Color3 objects.

1 Like

Lerp can actually work with any special value that can be transitioned. It will work with Color3, CFrame, Vector3, UDim2, etc.

Use:

value:Lerp(sameValueType,percentage)

Example:

Vector3.new(0,0,0):Lerp(Vector3.new(0,2,0),.5)

Result:

Position of (0,1,0)

So that basically takes the first value and transitions it toward the second value, but at the percentage you give it (0-1), so 0.5 would make it 50% or half way between.

2 Likes