It would be helpful if you were to post more details here.
Exploiting is always something one must account for when making a game.
There are different ways people might exploit, and thus various security practices you will want to use.
For example, you process things like money transactions on the server (most people already know to do this) and the same thing with applying damage to other players when they get hit with a bullet.
As I said, that’s pretty universal. It can become more complicated though when it comes to deeper level exploits. (Ie not all exploits are surface level like speed hacking) Based off of your brief description, it sounds like there are two problems
(When I say client I mean the software on the player’s computer, and when I say player I mean the dude sitting at a chair playing the game)
- The client can teleport with no consequences
- The client can know where all the coins are
#1
There are a few ways to solve this. Probably the easiest would be to make a script on the server that checks the distance a player has moved within a given amount of time and either rubberband them back or kick them if they move too far. This would also prevent speed hacking. Another way to fix this would be more complicated but could involve checking the direction they move and if they go through walls, etc.
#2
I don’t have much information about this but it sounds like the clients have access to where the coins are. You could potentially devise a system that only loads in a few near the player to the client so that they dont have access to a full list of where coins are.
Another way you could prevent cheating is to rate limit picking up coins like @galaxyblazing said.
Edit:
My personal recommendation for a quick fix would be to check every 0.2 seconds or something and see if the player moved >50 studs from their original position or something. If they do, TP them back and give them a tally. If they hit two or three tallies kick them from the game. The reason I wouldn’t recommend insta kicking is that sometimes physics can crap out and fling your player.