I’ve got this situation where there’s a remote event, between a server and a client. This remote event is used to send information about the inventory from the server to the client.
Now, on the client side, I’ve set up two separate pieces of code, or scripts, to handle this incoming inventory data.
The first script is responsible for creating objects in the client’s virtual world based on the inventory data it receives. Think of it like building structures or items in a game.
The second script deals with selling these inventory items. So, when the player decides to part with an item, this script takes care of the selling process.
Here’s the actual code that listens for the inventory updates:
luaCopy code
STC.UpdateInventory.OnClientEvent:Connect(function(D)
Data = D
print(Data)
end)
Now, here’s where it gets tricky: When I have both of these scripts running simultaneously, there’s a problem. Only one of them seems to work correctly at any given time. It’s like they’re taking turns, and if I deactivate one of them, the other springs into action.
So, the challenge here is to figure out how to make both of these scripts operate smoothly together, allowing the client to build objects and sell inventory items without interfering with each other.
Yes I believe I did find a solution. I think I put a wait in front of one of the remote function listeners. I think there was some weird thing were it couldn’t process multiple receivers at the same time so you have to wait a bit. If that doesn’t work let me know and I can check specifically what I did