yeah, and I want to get the time to keep updating, it works with both os.date() however, whenever a user left it gives the same output as the one when they joined the game
PLAYERS.PlayerAdded:Connect(function(player)
local timestamp = DateTime.now():ToIsoDate()
local s, PictureUrl = pcall(function()
return HTTP:JSONDecode(HTTP:GetAsync("..."))
end)
if s and PictureUrl then
PictureUrl=PictureUrl.data[1].imageUrl
else
PictureUrl="..."
end
local DATA = {
["embeds"] = {
{
["title"] = "**Click me to view Profile!**";
["description"] = player.Name.." is now in Main Game.";
["color"] = 4062976;
["url"] = "https://www.roblox.com/users/"..player.UserId.."/profile";
["fields"] = {
{
["name"] = "Join Time";
["value"] = timestamp;
["inline"] = false;
},
};
["thumbnail"] = {
["url"] = PictureUrl;
};
}
}
}
local success, err = pcall(function()
local FINALDATA = HTTP:JSONEncode(DATA)
HTTP:PostAsync(URL, FINALDATA)
end)
if not success then
task.wait(3)
local FINALDATA = HTTP:JSONEncode(DATA)
HTTP:PostAsync(URL, FINALDATA)
end
end)
PLAYERS.PlayerRemoving:Connect(function(player)
local timestamp = DateTime.now():ToIsoDate()
local s, PictureUrl = pcall(function()
return HTTP:JSONDecode(HTTP:GetAsync("..."))
end)
if s and PictureUrl then
PictureUrl=PictureUrl.data[1].imageUrl
else
PictureUrl="..."
end
local DATA = {
["embeds"] = {
{
["title"] = "**Click me to view Profile!**";
["description"] = player.Name.." is leaving Main Game.";
["color"] = 4062976;
["url"] = "https://www.roblox.com/users/"..player.UserId.."/profile";
["fields"] = {
{
["name"] = "Leave Time";
["value"] = timestamp;
["inline"] = false;
},
};
["thumbnail"] = {
["url"] = PictureUrl;
};
}
}
}
local success, err = pcall(function()
local FINALDATA = HTTP:JSONEncode(DATA)
HTTP:PostAsync(URL, FINALDATA)
end)
if not success then
task.wait(3)
local FINALDATA = HTTP:JSONEncode(DATA)
HTTP:PostAsync(URL, FINALDATA)
end
end)```