so for example a client sends a event to a specific client, then the client sends back the result to the sender client
bindablefunctions have no specific target to fire and im just a bit confused on what to use
and i tried to use remote events to fire the specific target but im not show how i can return the result back to the original sender because its 2 events
If you want to fire a specific event for a specific client, you can use the :FireClient() function. As for sending an event to the player that called the original event, you can still use :FireClient() as one of the parameters of .OnClientEvent is the player that fired the original event.
You can use that player parameter from .OnClientEvent to incorporate it into :FireClient(), in order to fire an event back to the original sender.
You can find out more about :FireClient() and .OnClientEvent here:
local remoteFunc = --your remote function
local data = remoteFunc:InvokeClient(plr,"you can add arguments if you want too")
and now on the other client script
local remoteFunc = --remote function
remoteFunc.OnClientInvoke = function(argument)
if argument == "you can add arguments if you want too" then
return true
else
return false
end
end
this is going to make data equal to true so
back to the first client script
if data then --if data is true
print("lebron james")
end
but still i recommend not having 5000 client scripts everywhere cause there is really no point in having 2 completely different client scripts unless they are each for completely different reasons