Functions in table not getting passed through with a RemoteFunction

Hi,

So basically, I have a table, which is a custom object I made, with a bunch of keys and values including functions. I have a RemoteFunction which passes this table from server to client upon the client’s request. The table that is being passes through does have the values like TimeLimit, Players, Delay, etc. But it does not have the functions that it is supposed to have:

As you can see on the screenshot, the tables are different from eachother. Is it normal that functions aren’t passed through a RemoteFunction or -event? Or is there something I am missing?

Server:

local GameInstance = GameService:CreateGame(presets[1])
	
repstorage.RemoteFunctions.GetGameInfo.OnServerInvoke = function(player)
	print(GameInstance)
	return GameInstance
end

Client:

while true do
	local GameInstance = game.ReplicatedStorage.RemoteFunctions.GetGameInfo:InvokeServer()
	print(GameInstance)
	if GameInstance.IsInGame then
		local isInGame = GameInstance:IsInGame(player)
		local isInfected = GameInstance:IsInfected(player)
		if isInGame then
			if isInfected then
				indicator.Text = "Infected"
			else
				indicator.Text = "Pure"
			end
		else
			indicator.Text = "Spectating"
		end
		purescore.Text = #GameInstance.Players.Pure
		infectedscore.Text = #GameInstance.Players.Infected
		if GameInstance.State == "Starting" then
			timer.Text = toMS(GameInstance.DelayTime)
		elseif GameInstance.State == "Started" then
			timer.Text = toMS(GameInstance.Time)
		end
	end
	wait(.75)
end
1 Like

Yes, but unfortunately it’s not properly documented on the wiki. You should file a bug report in #bug-reports:developer-hub (search first to see if it’s already been reported).

1 Like

Thanks! Instead, I’ll just run the functions on the server-side and pass the returned values.

1 Like