hey all.
im trying to send data between two server scripts, and to that end im trying to use a bindable function that invokes the data i want to send on one end, and basically just grabs and saves it on the other.
something sort of like this:
relevant code in script with data
local ServerStorage = game:GetService("ServerStorage") local bf = ServerStorage.DataPasser bf:Invoke(transferid,transferplayer,ModifiableStatsDictionary)
relevant code in script that wants the data
bf.OnInvoke = function (transferid,transferplayer,ModifiableStatsDictionary) local localid = script.Parent.Name if transferid == localid then player = transferplayer StoredStatsDictionary = ModifiableStatsDictionary end end
the problem im having is that the script that sends the data comes to the invoke line, and just stops. it doesnt throw an error or anything, the script just halts there and doesnt execute anything from that point forward. and from what i can tell, the second script doesnt do anything either.
have i writen something wrong? is it the way im checking for the correct id before saving the data? any input would be appreciated.
With Bindable/Remote functions, you always need a return, whether it returns something or nothing.