I simply need to check if a player has any saved data, and the Entry Menu to act accordingly.
I have a RemoteFunction “Profile” stored in a folder in Replicated Storage, the client invokes it, and the server checks to see if they have played before.
Oddly enough, nothing happens, and I find out that the server function is not even running to begin with.
local UserProfile = Events.Profile:InvokeServer()
if UserProfile ~= nil then
--(removed for simplicity)
local Name = player.Name
if _G.PLAYER_DATA[Name] == nil then return nil end
if _G.PLAYER_DATA[Name].Data.Profile.RPName == "" then return nil end
Events.Profile.OnServerInvoke = GetProfile
I have troubleshooted the issue to find that all loops in any involved script does not yield forever, and allows the client to invoke the server with Profile. I also know that the client does invoke the server, but the GetProfile function does not run.
Is this an issue with the engine, or am I missing something?
EDIT: The Interface that handles player currency is also not working properly, which may indicate that all of the RemoteFunctions (and possibly Events) are not being handled by the server either.
I am a bit embarrassed to say that the issue was that is in one of the event connections, I forgot to use OnServerEvent and directly used Connect to the RemoteEvent object, which hindered the other connections.