How should I approach passing of server to client information?

For my project, a player can search an ingame website. The way I have it set up now, the client fires a remote function that searches SS for the given string and moves it to RS, then into PlrGui. It works fine for direct website searches, but what if the player searches a tab inside of the website, for example

search('rbw./roblox.com/developer')
--Instead of
search('rbw./roblox.com')

On the server, once the RF gets fired, it searches through SS and uses string.find() to see if there is a match. This is not ideal, nor efficient for the client because it has to wait for the website to be found, then it could be the wrong website since string.find() is used (As shown by the pre. Some ideas that I thought may tackle this problem

  • Have a script for every website that acts as its own server. Name the function or event that the client fires to the main website name, then the script passes information back, and parents the correct gui to RS, although this is not efficient and could result in more stress on the client, having to load in all of the scripts.

  • Have one large module script in RS that handles the requests. This is pretty similar to the fire the server.

Basically, I need an efficient and easy way to get an direct object from server to client. I’m up for any ideas and things that I may have not considered. I’m not the most experienced scripter so I could be missing something or not utilizing a feature. Thanks!

Is there a reason why you dont just have a folder in replicated storage and the client searches for it, and if you couldnt do that, then couldnt you also just create a fake website loading sequence?

Couldn’t this add stress client side, for example if 100 websites have 3 tabs each, that would be 300 different folders, the way I have it now.

I could do this, yet as I said before, I want the tabs to be accounted for instead of treating it as an entirely new website.

I believe this would be better for the client still rather than the server.

I would say optimize your finding system.

I believe string.match and string.find do pretty much the same thing, and plus you’d if the server can handle it, the client def can

1 Like