Hello. I am trying to send a dictionary from Client to Server.
Dictionary
local userInputData = {
['Title'] = level.Text;
['Username'] = player.Name;
['Avatar'] = players:GetUserThumbnailAsync(player.UserId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size420x420);
['Answers'] = {
appFrameData['Answers'][1];
appFrameData['Answers'][2];
appFrameData['Answers'][3];
appFrameData['Answers'][4];
}
}
Server
submitEvent.OnServerEvent:Connect(function(player, userInputData, appFrameData)
local dataToSend = {
['content'] = '',
['embeds'] = {
['title'] = userInputData['Title'],
['description'] = 'Username: '..userInputData['Username'],
['color'] = 5661687,
['footer'] = {
['icon_url'] = 'https://tr.rbxcdn.com/c379b37e1dc253d6dcab6355c4a2272d/150/150/Image/Png',
['text'] = 'RECRUITMENT CENTER'
};
['thumbnail'] = {
['url'] = userInputData['Avatar'],
};
['author'] = {
['name'] = 'SCP:F | [APOLLYON]',
['icon_url'] = 'https://tr.rbxcdn.com/c379b37e1dc253d6dcab6355c4a2272d/150/150/Image/Png',
};
['fields'] = {
{
['name'] = userInputData['Questions'][1],
['value'] = userInputData['Answers'][1],
};
{
['name'] = userInputData['Questions'][2],
['value'] = userInputData['Answers'][2],
};
{
['name'] = userInputData['Questions'][3],
['value'] = userInputData['Answers'][3],
};
{
['name'] = userInputData['Questions'][4],
['value'] = userInputData['Answers'][4],
};
}
}
}
local finalData = https:JSONEncode(dataToSend)
https:PostAsync(discordHook, finalData)
end)
Error
Title is not a valid member of Player "Players.Forged3v1MiamiClutch" - Server - Server:26