Remote functions stop the code from running afterwards

I am not sure if this is a bug or if I did something wrong. So I will just assume the latter.

print('working wonderfully up to this point\nnow we invoke the server to get some stuff')
FetchDataRemote:InvokeServer("Worlds", "SinglePlayer")
print('this doesnt print')

So after some debugging, I realize it might just be the fact that the server script didn’t run. Which was not the case.

local FetchDataReferalTable = {
	Worlds = {
		SinglePlayer = function()
			return WorldList:GetTable({})
		end,
		Multiplayer = function()
			return MultiplayerWorldList:GetTable({})
		end
	},
	Settings = function(Key)
		local Table = Settings:GetTable(DefaultSettings)
		return (Key and Table[Key] or Table)
	end
}
FetchDataRemote.OnServerInvoke = function(_,...)
	print"asdasdasd"
	local Arguments = {...}
	return Arguments[2] and FetchDataReferalTable[Arguments[1]][Arguments[2]]() or FetchDataReferalTable[Arguments[1]]()
end

print"loaded"

Console:

16:30:25.229  loaded  -  Server  -  Main:69
16:30:27.771  working wonderfully up to this point
now we invoke the server to get some stuff  -  Client  -  LocalPlayerController:197
16:30:30.273  Infinite yield possible on 'Chat:WaitForChild("ClientChatModules")'  -  Studio
16:30:30.273  Infinite yield possible on 'ReplicatedStorage:WaitForChild("DefaultChatSystemChatEvents")'  -  Studio
16:30:31.530  Disconnect from ::ffff:127.0.0.1|60562  -  Studio

Ignore the infinite yields as I destroyed them deliberately.

I tried it and it worked for me, maybe there is something wrong with WorldList:GetTable({}) function that causes the code to yield?

I tried and I changed it to

SinglePlayer = function()
	print('asdasd')
	return WorldList:GetTable({})
end

And nothing printed.

Interesthing, where is this remotefunction located?

Under ReplicatedStorage. and the remote function was created with script.

And the script that creates it is server sided right?

It is the only object server-sided excluding the Datastore Module and its descendants which is Datastore2. (and stuff in the workspace)