Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

BindableFunction from ReplicatedFirst?

Hello. I made a big script, but after realized that it won't work good in Server mode, so I started it from scratch. Why LocalScript from ReplicatedFirst (that moved to playerGui later) can't Invoke BindableFunction? I have Settings file in ServerScriptStorage, special script that return parameter OnInvoke and this LocalScript. Looks like:

local settings = game.ReplicatedStorage.Api.getParam
print(settings:Invoke('Version', script)[1])

But LocalScript done nothing. Server script not even received OnInvoke from Localscript. Is there a special limitation? How to fix it?

1 answer

✓ Accepted answer

BindableEvents/Functions only work one side of the network
Similarly, RemoteEvents/Functions only work across the network. Tricky.

A BindableFunction being invoked on the client will only invoke the function attached by a LocalScript. Similarly, invoking it on the server will only invoke functions on the server. Try using a RemoteFunction instead.

This discussion is preserved as it was. New answers, comments, and votes are closed.