-
What do you want to achieve?
I want that when killing does not return the money spent -
What is the issue? https://gyazo.com/cac5e50a5624631cf945d681a024c7f3 It is assumed that when I kill I receive 5 money but it returns the money spent
-
What solutions have you tried so far?
I tried modifying the stats of the leaders, but I think the problem is with the store itself
-- 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("Cash").Value >= price.Value then
player.leaderstats:FindFirstChild("Cash").Value = player.leaderstats:FindFirstChild("Cash").Value - price.Value
game.ReplicatedStorage.ShopBuy:FireServer(tool.Value)
end
end)
or maybe it’s the kill for money system?