Issue with MessaginService?

For some reason the JSON isn’t getting decoded? What am I doing wrong?

local Players = game:GetService("Players")
local HttpService = game:GetService("HttpService")
local MessagingService = game:GetService("MessagingService")

--Stuff Here

local decodedData = HttpService:JSONDecode(Message.Data)

while true do

local Data = {
game.JobId -- This will return the job id from the current server of your game

local Encoded = HttpService:JSONEncode(Data)
local Sucess,Error = pcall(function()

1 Like

Hmm, where are you actually decoding it ?

Sorry I edited it, I was doing another test without it to see if I got the same results. Decode is in there.

1 Like

I hope you’re using JSONDecode() on a string

I guess not.

game.JobId is that data being sent. I’m trying to send some sort of server id too all servers. I want to make a server list UI eventually.

Is there another way to send some sort of identifier for a server?

Edit: never mind I figured it out.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.