Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Help me with my buy script. I can't get it to know what price is. I have tried solutions? [closed]

Asked by 5 years ago

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.

0
Please put it in code blocks: ~~~code here~~~ so we can read it mixgingengerina10 223 — 5y

Closed as Non-Descriptive by User#19524

This question has been closed because its title or content does not adequately describe the problem you are trying to solve.
Please ensure that your question pertains to your actual problem, rather than your attempted solution. That is, you were trying to solve problem X, and you thought solution Y would work, but instead of asking about X when you ran into trouble, you asked about Y.

Why was this question closed?