Its supposed to display a system message in chat but it doesn’t appear for some reason, any idea why?
local function donateButtonClicked(donateButton)
local itemId = donateButton.Value.Value
local itemPrice = donateButton.Price.Value
MarketPlaceService:PromptPurchase(loser, itemId)
MarketPlaceService.PromptPurchaseFinished:Connect(function(loser, itemId, was_purchased)
if was_purchased then
loser.leaderstats.Donated.Value += itemPrice
local playerId = loser.UserId
game.StarterGui:SetCore("ChatMakeSystemMessage", {
Text = "[SYSTEM] "..loser.." donated "..itemPrice.." robux to "..winnerName;
Font = Enum.Font.Cartoon;
Color = Color3.new(0,255,0);
FontSize = Enum.FontSize.Size96;
})
end
end)
end
Are you using the older chat functions which have been superceded? You are using invalid references to the GUI using game.StarterGui. Everything in ``game.StarterGuigets replicated to the player client on join and thus becomes a local reference to the player, iegame.Players.LocalPlayer.PlayerGui```.
I send system messages in chat using the following
I don’t understand, how should I be handling purchases, I had the script on the client side but people said it was vulnerable to hackers so to keep it on the client side.