Hi,
I made a toolshop, but when I try to click the buy button, it shows this in output:
When I click on the error, it leads to this script:
local Tool = script.Parent.Tool.Value
script.Parent.MouseButton1Click:Connect(function(player)
if game.Players.LocalPlayer.leaderstats.Money.Value >= script.Parent.Cost.Value then
game.Players.LocalPlayer.leaderstats.Money.Value = game.Players.LocalPlayer.leaderstats.Money.Value - script.Parent.Cost.Value
game.ReplicatedStorage.Events.RemoteEvent:FireServer(Tool, player)
script.Parent.ToolName.Text = "Success!"
wait(3)
script.Parent.ToolName.Text = "Bread"
else
script.Parent.ToolName.Text = "Not enough coins!"
wait(3)
script.Parent.ToolName.Text = "Bread"
end
end)
It’s referring to this intvalue: