I'm trying to get a part to be taken before the other.(one on top of the other) I need a script that makes me take the top one before the bottom one. this script makes e get 1 coin for a block. I need a script that takes the top one before the bottom. mabey a wait until or something? Script:
script.Parent.Touched:connect(function(part) if game.Players:findFirstChild(part.Parent.Name) then local plr = game.Players:findFirstChild(part.Parent.Name) plr.leaderstats.Coins.Value = plr.leaderstats.Coins.Value + 1 end end) local debounce = true script.Parent.Touched:connect(function(part) if debounce then debounce = false if game.Players:findFirstChild(part.Parent.Name) then local plr = game.Players:findFirstChild(part.Parent.Name) plr.leaderstats.Coins.Value = plr.leaderstats.Coins.Value +1 script.Parent:destroy() end end end)