I'm having some issues finding out how to let people purchase the same item after they have purchased. Any Suggestions?
ReplicatedStorage.ShopEvents.Ninjago.OnServerEvent:Connect(function(player) if player.leaderstats.Money.Value >= 500 and MyDebounce == true and player then MyDebounce = false player.leaderstats.Money.Value = player.leaderstats.Money.Value - 500 ServerStorage.Tools.AzureSword:Clone().Parent = player.Backpack game.StarterGui.Shop.Shop.BuyingInfo.LegoNinjago.Buy.Text = "Bought" if player.leaderstats.Rebirths.Value >= player.leaderstats.Rebirths.Value + 1 and MyDebounce == false and player then MyDebounce = true end end end)
I believe your MyDebounce never reverts to true. In this case, it only is able to run it once since the dbounce never reverts back to true and it's required to be true for the function to run.
Also, since the MyDebounce doesn't seem to be local in the function, if one player fires the event, the MyDebounce will change for all players. You want to make the MyDebounce local to the function.
local MyDebounce = true then put the rest of your script
ReplicatedStorage.ShopEvents.Ninjago.OnServerEvent:Connect(function(player) local MyDebounce = true if player.leaderstats.Money.Value >= 500 and MyDebounce == true and player then MyDebounce = false player.leaderstats.Money.Value = player.leaderstats.Money.Value - 500 ServerStorage.Tools.AzureSword:Clone().Parent = player.Backpack game.StarterGui.Shop.Shop.BuyingInfo.LegoNinjago.Buy.Text = "Bought" if player.leaderstats.Rebirths.Value >= player.leaderstats.Rebirths.Value + 1 and MyDebounce == false and player then MyDebounce = true end end end)