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

4 comments

0

If it has a transparency script for the coin, or something that disables the script, try removing that, if it doesn't help, or if there's something different, reply to this comment and I'll get back to you.

0

ok i am going to edit it and put the collect script

0

Use code block please.

0

how