whoever solves gets solution guarenteed
this might be a simple question to answer for some of you but i just want to know how i can fire an event when someone buys a product and here’s why:
local StarterGui = game:GetService("StarterGui")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RemoteEvent = ReplicatedStorage:WaitForChild("RemoteEvent")
RemoteEvent.OnClientEvent:Connect(function(PlayerName, GamepassName, GamepassPrice)
StarterGui:SetCore("ChatMakeSystemMessage", {
Text = PlayerName.." just bought "..GamepassName.." for "..tostring(GamepassPrice).." Robux!",
Color = Color3.fromRGB(255, 200, 0),
Font = Enum.Font.Arial,
FontSize = Enum.FontSize.Size24,
}
)
end)
i found this code and tried my best to fix it but idk what im doing im trying to make it to where if someone buys a product a remoteevent is triggered and it makes a message in chat that says so and so bought the product for so and so robux