Hello! I am making a game where I have a proximity prompt that gives the player money. That proximity prompt works. But when I made the same one for subtracting money, it doesnt. There are no error messages. Whats going on?
Here is the code:
script.Parent.Triggered:Connect(function(player)
local playerStats = player:FindFirstChild("leaderstats")
local money = playerStats:FindFirstChild("Money")
if money >= 10 then
money.Value = money.Value - 10
end
end)