I am trying to make a coin that does not disappear for other players when a specific player gets it. Can anyone help? Coin collector script is below.
https://docs.google.com/document/d/1ovj05vBYUQi-sYfgLZZHLxtmv30zjVYja6ccyn6rMKI/edit?usp=sharing
I am trying to make a coin that does not disappear for other players when a specific player gets it. Can anyone help? Coin collector script is below.
https://docs.google.com/document/d/1ovj05vBYUQi-sYfgLZZHLxtmv30zjVYja6ccyn6rMKI/edit?usp=sharing
You are currently using a normal script meaning that it happens for the server. If you spawn the coins via a local script inside the player, each coin should be client side.
This is not as simple as copy and paste into a local script and disable the other script.
No, I'm not saying to copy and paste. I'm saying to spawn the coins, using a different script, on the client side
yes, but idk how to change the current script to a local script. that is my question
Once you spawn the coins from the client, it should still work if that script is a child of the coin
this script is inside the coin, but how to make the other script?
I assume that you already have a script outside of the coin to spawn, am I correct with this or no?
no, the script that i provided is the only script that actually does the work
So create a local script that looks at a value (Total coins) in the player and if it's less than the number you want, spawn coins slowly based on a random number. When a coin is added, make a counter to the value. Again, do this on the client using a local script
I have no idea what you are talking about.. sorry
This discussion is preserved as it was. New answers, comments, and votes are closed.
5 comments
Please format the code so we can see it.
alright srry how do i do that
When you paste your code, there's a little button: https://imgur.com/a/NUms75r that you can click to format your code. Just highlight your code and press it and it should be all good.
In your code, maybe you could put various print() statements to see if parts of the script are working
it works but is not local