Okay i have a script that turns a table into a string for messagingservice but the jobid is nil even though the script prints it
Code:
local MessagingService = game:GetService("MessagingService")
local MESASSGING_TOPIC = "ReceiveServerInfo"
local MESSAGING_TOPIC2 = "RequestServerInfo"
local subscribeSuccess, subscribeConnection = pcall(function()
return MessagingService:SubscribeAsync(MESSAGING_TOPIC2, function()
local publishSuccess, publishResult = pcall(function()
local playercount = #game.Players:GetChildren()
local ownername = game.ReplicatedStorage.MsgserviceInfo.Owner.Value
local mapname = game.ReplicatedStorage.MsgserviceInfo.Map.Value
local JobID = game.ReplicatedStorage.MsgserviceInfo:WaitForChild("JobID").Value
print(JobID)
local info = {
playercount ,
JobID,
ownername,
mapname
}
local stringMessage = info.playercount.." "..JobID.." "..info.ownername.." "..info.mapname -- THIS IS LINE 19
MessagingService:PublishAsync(MESASSGING_TOPIC, stringMessage)
end)
if not publishSuccess then
print(publishResult)
end
end)
end)
Result: