A collectible system sounds simple until two players touch the same coin. Decide who gets the point, when the coin returns and what resets before writing the code.
You will specify a five-coin gate mechanic before implementing it. Use a text chatbot and allow about 30 minutes. This is a design exercise; it does not require publishing a game.

Read this example as text
Available
- Valid player touches coin
- Set unavailable first
- Award one point
Cooling down
- Ignore extra touches
- Wait for the chosen delay
- Make the coin available again
See the finished example
This is a working browser model of the rules, not a Roblox Studio capture. The Studio scripts need separate Studio checks.
1. Describe the player action and feedback
Our fictional game lets a player touch coins. Each valid pickup adds one point. Once that player's score reaches five, a gate becomes passable for that player. That last phrase raises an implementation question: per-player access is more complex than opening one shared gate.
For a first prototype, choose a simpler rule: coins and the gate are shared within one server session. The first player reaching five opens the gate for everyone. That is a deliberate design choice, not a universal rule for collectibles.
2. Ask the assistant to expose ambiguity
Help me specify a small coin-and-gate mechanic before coding.
Players touch coins to gain one point. The first player reaching five
opens a shared gate for the current server session.
Ask about coin respawn, repeated touches, simultaneous players,
score reset, player departure and visible feedback. Then produce
states, transitions and a test matrix. No persistent saving, purchases,
inventory trading or whole-game design. Separate unresolved questions
from decisions. Do not silently invent rules.
3. Write states and transitions
One coin can be available or cooling down. An available coin touched by a valid player changes to cooling down before awarding its point. After the chosen cooldown, it becomes available again. A cooling-down coin gives no reward.
The shared gate begins closed. A score reaching five opens it and it remains open until the server resets. Player scores reset on a new session; permanent saving is outside scope.
This order matters because collision events can fire repeatedly. Roblox's debounce documentation explains why repeated triggers need explicit handling.
4. Build the test matrix
| Situation | Intended behaviour |
|---|---|
| One player touches an available coin | One reward, then cooldown. |
| Same player keeps touching | No extra reward during cooldown. |
| Two players touch nearly together | Only the first valid claim rewards. |
| Non-player object touches | No reward. |
| First score reaches five | Shared gate opens. |
| Server restarts | Gate and scores reset. |
If you want different behaviour, change the specification before coding. A per-player coin is a different design, not just a visual change.
5. Write a small, clear coding brief
Specify the engine, object hierarchy, script locations and score representation. Ask for the simplest prototype and how to test each matrix row. Keep the gate as a later increment after basic pickups work.
The plan becomes a whole game: restore the non-goals. Multiplayer behaviour is unclear: define who owns each state. The assistant adds saving: state explicitly that persistence is excluded.
A precise mechanic specification makes the eventual code easier to review because you know what each transition is supposed to achieve.
