Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Make coin appear for everyone else?

Asked by 4 years ago
Edited 4 years ago

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

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. 2_MMZ 1059 — 4y
0
ok i am going to edit it and put the collect script JLKMaster 0 — 4y
0
Use code block please. R_alatch 394 — 4y
0
how JLKMaster 0 — 4y

Answer this question