https://gyazo.com/a023ff2c8e3a63eabf7f0757aca00592
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")
MessagingService:SubscribeAsync("Servers",function(Message)
--Stuff Here
local decodedData = HttpService:JSONDecode(Message.Data)
print(decodedData)
end)
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()
MessagingService:PublishAsync("Servers",Encoded)
end)
task.wait(5)
end