Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How would I organize this data and apply it?

Asked by 10 years ago

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?

function log(Donater, Amount, Reciever)
Instance.New("Frame")
--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.

1 answer

Log in to vote
1
Answered by 10 years ago

Not so sure this is helpful, but-- yes, you can make them all move down when another one logs.

function log(Donator, Amount, Reciever)
local player=game.Players:findFirstChild(Donator)
local d=Instance.new("Frame",player.PlayerGui)
local c=Instance.new("TextLabel",d)
c.Text=""..Donator.." has donated $"..Amount.." to "..Reciever..""
end

log("Bill",50,"John") -- Bill has donated $50 to John
-- Note that this will not move them down, only creating the gui
Ad

Answer this question