Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

BindableFunction from ReplicatedFirst?

Asked by 9 years ago

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

Log in to vote
0
Answered by 9 years ago

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.

Ad

Answer this question