This is a ServerSide SCript
local Debounce = true
script.Parent.Touched:connect(function(Part)
if Debounce then
Debounce = false
script.Parent.Transparency = 1
local Player = game.Players:GetPlayerFromCharacter(Part.Parent)
local PlayerTrash = Player.leaderstats.Trash
local PlayerRebirth = Player.leaderstats.Rebirths
PlayerTrash.Value = PlayerTrash.Value + (PlayerRebirth.Value + 1)
print((PlayerRebirth.Value + 1))
wait() script.Parent:Destroy()
end
end)
it prints out 1 so PlayerRebirth.Value is 0 even thought on leaderboard i says 1
If my rebirth was 1, it would give me 1 Trash but it is supposed to give me 2

3 comments
use :Connect() not :connect() but idk the prob
what does it print out
1