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

How to make a coin only collectable once?

Asked by 3 years ago

So I have this game with coins and I want the coins to be able to be picked up by each player, but one player can't get it again.

This problem has been addressed in https://scriptinghelpers.org/questions/95211/scripting-a-coin-that-can-only-be-collected-once

But those answers didn't work when I tried it

My coin is named "Coin"

And I don't want a leaderstats for the coin, I hope you can help

1 answer

Log in to vote
1
Answered by 3 years ago

You could destroy the coin on the client or the server. Example:



if coin.Touched then coin:Destroy() --add money for the player who touched the coin end
0
@iNot_here But will it be destroyed for the other people JLKMaster 0 — 3y
0
@JLKMaster As long as the code that is destroying the part is in a localscript, it will only run on the client. In turn, not destroying the coin for others. 0xSRK6 0 — 3y
0
@OxSRK6 Where would I put it in? Workspace? Here's what I've got JLKMaster 0 — 3y
Ad

Answer this question