Say a user donates to another user. Then it would log a bunch of info on a screen gui.
I don't know how to create a function for when a user donates it will create a new frame or do a dynamic text label change. (When one text label changes into something else.)
Should I just create a new frame and re-position the other ones? And the one at the bottom will be removed when there is another donation logged?
1 | function log(Donater, Amount, Reciever) |
2 | Instance.New( "Frame" ) |
3 | --declare design and other things |
Here is an example.
First Donation
Frame 1- Jane donated $5 to Tom
When another user donates, Frame 1 would be moved down some how and a new frame would be added.
It should look like this.
Second Donation
Frame 2- John donated $10 to Bill
Frame 1- Jane donated $5 to Tom
And so on and so fourth..
But if the list is full, it removes the frame at the bottom of the list and creates a new one.
How would I go upon doing this? How would I start? I would like to know how to setup the function so it would be easier for me to address what happens when a user donates.
Not so sure this is helpful, but-- yes, you can make them all move down when another one logs.
1 | function log(Donator, Amount, Reciever) |
2 | local player = game.Players:findFirstChild(Donator) |
3 | local d = Instance.new( "Frame" ,player.PlayerGui) |
4 | local c = Instance.new( "TextLabel" ,d) |
5 | c.Text = "" ..Donator.. " has donated $" ..Amount.. " to " ..Reciever.. "" |
6 | end |
7 |
8 | log( "Bill" , 50 , "John" ) -- Bill has donated $50 to John |
9 | -- Note that this will not move them down, only creating the gui |