I just wanna get something cleared up. Ive been dealing with this bug in my game for a while now, and it involves remote functions.
So i was wondering, when you call a remote function from the client and a server script passes a function for that remotefunction, does that function run on the server or the client? Does the server actually run the function and return a result, or does it just give the client the function entirely and let the client sort it out?
For example, lets say i have remoteFunction “functionA” in the workspace, and i have a localscript like this:
local func = game.workspace.functionA
local ans = func:InvokeServer()
and then a server script in the workspace like this:
local func = game.workspace.functionA
local function MoveBrick()
game.workspace.part.Position = Vector3.new(0,0,0)
return
end
func.OnServerInvoke = MoveBrick
What i wanna know is does MoveBrick()
get executed on the server or the client?