Hello, I'm using this script:
local price = script.Parent.Parent.Price
local tools = game.ReplicatedStorage:WaitForChild("Tools")
local tool = script.Parent.Parent.ItemName
local player = script.Parent.Parent.Parent.Parent.Parent.Parent
script.Parent.MouseButton1Click:Connect(function()
if player.leaderstats:findFirstChild("Money").Value >= price.Value then
player.leaderstats:findFirstChild("Money").Value = player.leaderstats:findFirstChild("Money").Value - price.Value
game.ReplicatedStorage.ShopBuy:FireServer(tool.Value)
end
end)
but when I click the button, the script take the money from the player but doesnt give the item in the player's inventory.

1 comment
You can't leave us without the Script that is responsible for actually giving the Item...