Hi, is anyone else experiencing problems with remote functions not firing? I have some code that worked a few weeks ago and is now broken for some reason I cannot figure out. The remote functions are located in the ReplicatedFirst service if that makes a difference. Every debugging test I ran checks out. The function is connected to a callback on the server and the client calls :InvokeServer(), but it stops short of actually receiving the request. Help!
To verify, I just tested this in a new baseplate:
Localscript (game.ReplicatedFirst.LocalScript):
local rf = script:WaitForChild(“RemoteFunction”)
wait(1)
rf:InvokeServer()
Server script (game.ServerScriptService.Script):
local rf = Instance.new("RemoteFunction") rf.Parent = game.ReplicatedFirst.LocalScript rf.OnServerInvoke = function(plr) print("TEST!") end
Even this is not working on studio?
Edit: I changed the parent of the RemoteFunction to game.Workspace and it works fine. I believe this is a newly introduced Roblox bug…
How about changing the parent of the remote to ReplicatedStorage?
I don’t know if remote functions work in ReplicatedFirst
. I assume it isn’t a bug. RemoteEvents
and RemoteFunctions
should ALWAYS be stored in the place that was literally made for them: ReplicatedStorage.
Hey there!
Try something like this. I’m not entirely sure how the instances in ReplicatedFirst are replicated on the client, so it’s safest to put these remotes in a place proven to be effective in storing them.
Server
local replicatedStorage = game:GetService(“ReplicatedStorage”)
local remote = Instance.new(“RemoteFunction”)
remote.Name = “ExampleFunction”
remote.Parent = game:GetService(“ReplicatedStorage”)
Client
local replicatedStorage = game:GetService(“ReplicatedService”)
local remote = replicatedStorage:WaitForChild(“ExampleFunction”)
remote:InvokeServer()
If this still doesn’t work, try putting the local script in Starter Player, but it should hopefully work!
Hope this helps!
I have already found that storing the remotes somewhere other than ReplicatedFirst works. The problem is they worked in ReplicatedFirst the last time I tested this a few weeks ago. That’s why I’m thinking its a roblox bug.