So I'm making a game where people can collect coins, but I want everyone to collect the coin. Is there a script that lets everyone collect the coin.
Basically, if player1 collects a coin, I don't want it to disappear for player2. Then player2 will also be able to collect the same coin without it disappearing for player2
Is there a script to do this because I'm quite new and have no idea
my script
local db = true script.Parent.Touched:connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") ~= nil then if db == true then db = false script.Parent.Transparency = 1 local player = game.Players:GetPlayerFromCharacter(hit.Parent) player.leaderstats.Coins.Value = player.leaderstats.Coins.Value + 1 script.Sound:Play() wait(1) script.Parent:Remove() end end end)
i have some other scripts but those are for leaderboard and the coin's movement