Hey, how to solve this?

hey I have a problem about my Pet Store, where if the Resets time is up then the Pet will automatically replace it with a new one, But after the Resets time is up, the Pet does not replace automatically I don’t know what to do anymore

Video:

Check studio roblox File
ShopPet.rbxl (161.2 KB)
Help Please

How does your Local Script (GUI) know that the PetShop has been replaced?

1 Like

I don’t know so. the error is in the local script?

can you help me. with the studio file that i show above. i have no idea how to fix it?

Looks like you are deleting the contents of a folder, then cloning new stuff into the folder with a Server Script.

You need a Local Script (for the GUI) that will notice when the Server has updated the folder.

The Local Script could listen to the folder with a ChildAdded event. Or, you could send a signal to the Local Script through a RemoteEvent to let it know the folder has changed.

1 Like

can you give me the studio file?

I am guessing you mean you want a sample.

Here is one:

change.rbxl (55.8 KB)

Make sure your Output window is visible so you can see the print statements.

1 Like

easy fix what i do for shops is make a serverscript that updates it then sends a event to the client containing the new data and updates the gui

1 Like

I don’t understand the script so I can only provide my studio file and what to change

can you help me? by opening this studio file then you fix it, if you have fixed it please give me the file. because I don’t really understand the script

ShopPet.rbxl (161.2 KB)

My advice is abandon this place, it is a bloated mess, and in truth it is beyond saving. If you didn’t write the code or know how it works then it shouldn’t be in your game.

Granted, I have written my own bloated mess of code on many occasions, but at least I wrote it and know what it was intended to do.

The shop will simply never update because the code to fill the billboard is called out-of-scope and only once, it is here in the LocalScript called “HatchClient” on line 70:

for i, v in pairs(Eggs:GetChildren()) do 
...
2 Likes

I agree with @dduck5tar , if you don’t understand the script then you shouldn’t be trying to use it.

There are tons of video tutorials out there. Maybe follow along with a few until you learn the basics.

2 Likes