i can't figure out why this is happening but whenever i purchase 'Double Tap' it seems to take away triple the amount it should. the price is 2500, it takes away 7500
local dt = game.Workspace.BZInteractables["Double Tap"].Origin
local prompt = dt:WaitForChild("ProximityPrompt")
local cost = game.Workspace.BZInteractables["Double Tap"].Cost.Value
local purchased = false
local function perkPurchase(item)
if purchased == false then
game.SoundService.SFX.Purchase:Play()
purchased = true
else
return
end
end
local function pointDecrease(Player)
if purchased == false then
local leaderstats = Player:WaitForChild("leaderstats")
local Points = leaderstats:WaitForChild("Points")
Points.Value -= cost
else
return
end
end
prompt.Triggered:Connect(function(player) -- Triggered passes the player who activated it
pointDecrease(player)
perkPurchase(dt)
end)
** You are now Level 1! **