the name is self-explanatory but how would I fireServer after someone has made a dev product purchase?
here’s the script
local MarketplaceService = game:GetService("MarketplaceService")
local productId = 1615053567
local button = script.Parent
local ReplicatedStorage = game.ReplicatedStorage
local MutatorEvent = ReplicatedStorage:WaitForChild("MutatorEvent")
local Mutator = workspace.Mutators.DoubleCoins
local ActiveRound = workspace.Round.ActiveRound
local player = game.Players.LocalPlayer
local money = player.datastats.Money
local cost = 0 -- set to zero so that when it fires the server, the server wont take away money
button.MouseButton1Click:Connect(function()
if Mutator.Value == false and ActiveRound.Value == true and money.Value >= cost then
MarketplaceService:PromptProductPurchase(player, productId)
MutatorEvent:FireServer(Mutator, cost)
end
end)