This is the local script: script.Parent.MouseButton1Click:connect(function() local price = script.Parent.Parent.Price local player = game.Players.LocalPlayer if game.Players.LocalPlayer.leaderstats.BrawlBux.Value >= price.Value then local item = script.Parent.Parent.Item local backpack = player.Backpack local starter = player.StarterGear local clone = game.ReplicatedStorage.Tools:FindFirstChild(item.Value):Clone() local clone2 = game.ReplicatedStorage.Tools:FindFirstChild(item.Value):Clone() clone.Parent = backpack clone2.Parent = starter game.ReplicatedStorage.Buy:FireServer(price) end end)

This is the script: game.ReplicatedStorage.Buy.OnServerEvent:Connect(function(player, price) player.leaderstats.BrawlBux.Value = player.leaderstats.BrawlBux.Value - price.Value end)

I know what the problem is but idk how to fix it please help. I have tried many soulutions they dont work.

1 comment

0

Please put it in code blocks: ~~~code here~~~ so we can read it