Skip one and the AI guesses. Guesses are where bugs come from.
Know where code runs
Explorer
Workspace
Coinsthe coins go here
ServerScriptService
CoinServiceruns on the server
StarterPlayer
StarterPlayerScripts
AddPointscheaters can edit this
Scoring belongs on the server. Anything on the player’s device can be faked.
Send the prompt
Paste this into your AI
Build a coin collector in this place.
What: 20 gold coins scattered around the baseplate. Touching a coin gives the player 1 point. The coin respawns somewhere random after 5 seconds. Show the score on the leaderboard (leaderstats).
Where: server code in ServerScriptService. Coins in a folder called Coins in Workspace.
Rules: the server decides when a coin is collected. Nothing the client sends is trusted.
Check: playtest, walk into a coin with character_navigation, confirm the score goes up. Fix anything that fails.
Check its plan
Paste this into your AI
Explain, step by step, how a coin gets collected. Point out anything a cheater could abuse.
Red flag
The client fires a RemoteEvent to add points
Looks right
The server sees the touch and adds the point
Quick check
Where should the code that adds points run?
The server is the referee. If the player's device adds points, an exploiter can add a million.