here is the problem, if i click on the screen and then sell it works but when i click again it gives me 2 instead of one my rebirth count is 0 help?
script: (for the click for cash)
local replicatedStorage = game:GetService("ReplicatedStorage")
local remoteData = game:GetService("ServerStorage"):WaitForChild("RemoteData")
local cooldown = .5
replicatedStorage.Remotes.Lift.OnServerEvent:Connect(function(player)
if not remoteData:FindFirstChild(player.Name) then return "NoFolder" end
local debounce = remoteData[player.Name].Debounce
if not debounce.Value then
debounce.Value = true
player.leaderstats.Strength.Value = player.leaderstats.Strength.Value + 1 * (player.leaderstats.Rebirths.Value + 1)
wait(cooldown)
debounce.Value = false
end
end)
local script click to sell gui:
script.Parent.MouseButton1Click:Connect(function()
--Varibles--
local player = game.Players.LocalPlayer
local Cash = player:WaitForChild("leaderstats").Cash
local Strength = player:WaitForChild("leaderstats").Strength
--Varibles--
--Script--
Cash.Value = Cash.Value + Strength.Value
Strength.Value = 0
end)

2 comments
Some errors, editing.
My apologies, fixed up the errors.