Unique object identifier

I need the client and server to have the same unique identifiers for a set of objects.

In context: The player (a bee) tells the server to pollinate a flower. The server needs to know on its end which flower it is.

How can I do this?

EDIT: This thread discusses how to create unique IDs, but not how to have the client/server know the same IDs.

2 Likes

If both the server and the client know about the flower, then the client can just send the flower object via remote event to the server

Event:FireServer(Flower)
Event.OnServerEvent:Connect(function(Player, Flower)
1 Like

RemoteEvents and RemoteFunctions can’t pass instances.

RemoteEvents and RemoteFunctions can pass instances if both the client and server can see the instance being passed.

11 Likes