Webhook does not send over currency values

I have been trying to send currency values over to my webhook whenever someone joins, however it does not actually send over the value itself. Am I doing something wrong here?

obraz

obraz

script:

local Sender = require(game.ServerScriptService.Sender)
game.Players.PlayerAdded:Connect(function(Player)
	local Coins = Player.leaderstats.Coins
	local Data = {
		embeds = {
			{
				title = "Someone has joined!",
				color = math.random(0,255),
				fields = {
					{
						name = "Player Name",
						value = Player.Name
					},
					{
						name = "Player Id",
						value = Player.UserId
					},
					{
						name = "Coins",
						value = "C ".. Coins.Value
					},
				}
			}
		}
	}
	Sender.Send("webhooklink", Data)
end)

I have a hunch, but maybe this is because you’re sending the values before the coins’ value can be set to 1000.

maybe try adding a 1 second task.wait before the data is sent in order to see if thats the case

I think it started working once i put task.wait to 5 seconds, thanks for help!

Maybe try, tostring(Coins.Value)

1 Like

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