I am so confused right now. I have a remote function that was supposed to return info from a module script to a local script, because local scripts cant detect changes in module scripts at runtime without this. I did this method in another situation with another script and it worked fine. Created a new remote function and it doesn’t work this time? I’ve tried everything at this point and even this basic one doesn’t work:
In the local script, the remote function is a child of the script:
local func = script.Func
local function Testing()
print("Invoking")
local funcNotWorking = func:InvokeServer()
print(funcNotWorking)
end
Testing()
In the script that is a child of the remote function:
local func = script.Parent
func.OnServerInvoke = function(player)
return "Invoked"
end
There is no errors given at all, just straight up stops the entire script. Everything after invoking the remote function will not run. Any help?
The print statement after the invoke does not work, the print before it does. This is just a basic example though anything ive tried after it does not work. Just trying to simplify because nothing has solved my problems
Any errors? Where did you put the local script?
Oh wait I see you put the remotefunction in the local script and the server script inside the remote function??? Wha-
Put the server script in serverscriptservice and the remote function in replicatedstorage and the local script in like player gui or starterplayerscripts.