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

How do you save text buttons from a client?

Asked by 4 years ago

I am trying to make an inventory saving system. There are text button(s) inside of the client's inventory (GUI) if they buy something from the shop, and when they press the equip and unequip button, it all works. But I want to save the text button(s) in the client's inventory when they leave and join the game. Please help me!

2 answers

Log in to vote
0
Answered by 4 years ago

You could do save features, like with datastores. For example:

Server:

local owned = {"car", "cow"}
game.ReplicatedStorage.Remote:FireClient(plr, items)

Client:

game.ReplicatedStorage.Remote.OnClientEvent:Connect(function(items)
    for i,v in pairs(items) do
        TextLabel.Text = TextLabel.Text.." | "..v
    end

    TextLabel.Text = TextLabel.Text.." are owned"
end)

Just a basic system and from there you can expand it.

Ad
Log in to vote
0
Answered by
ImTrev 344 Moderation Voter
4 years ago
Edited 4 years ago

I would use ReplicatedStorage for the GUI items so you can clone them. And maybe creating a data store and save a table in it for your items. If you need any help with this, don’t hesitate to contact me.

Answer this question