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

client side server scripts not running, how can i fix/work around this?

Asked by 4 years ago

so i am working on a collectable coin system for my game. the way i want it to work is that everytime you respawn, the coins will be brought over to your clients workspace from replicated storage. for some reason when the coins are put into the workspace they dont spin and you cannot collect them(they are using server scripts), im assuming that the problem is because they are placed locally but im just not sure how to work around this.

1 answer

Log in to vote
0
Answered by
mc3334 649 Moderation Voter
4 years ago

From what you have said, this would be the best way around the problem. Since you are spawning the coins locally, they need to be detected locally as well. So switch the server sided detection script, to a client script (1 for each player), and then the coins will detect. Should you need to run functions based on when coins are collected, hook a remote event up to when the coin is collected on the client, to a function on the sever. Hope I answered your question!

Ad

Answer this question