local messagingService = game:GetService("MessagingService")
local success, errorMessage, connection = pcall(function()
messagingService:SubscribeAsync("PlayerInQueue",function(Queue)
print(Queue.Data)
end)
end)
game.ReplicatedStorage.JoinedQueue.OnServerEvent:Connect(function(LocalPlayer)
messagingService:PublishAsync("PlayerInQueue",LocalPlayer)
end)
When the JoinedQueue event is received it gives this error:
“MessagingService:PublishAsync(): Cannot publish Instance, can only accept valid UTF-8 characters.”
(The script isn’t finished yet, I just want to know how to fix this issue.)