Roblox Studio: Ship Your First Game
Coins and Score
Add coins the player can collect and a score on screen, using the Touched event.
Builder handle: ____________________ Date: ____________
Steps
- Make a score label. In StarterGui insert a ScreenGui, then a TextLabel. Set its Text to Score: 0. ☐
- Make a coin. Insert a small yellow Part named Coin, anchored, with CanCollide off. ☐
- Script the touch. Add a Script to the coin: local coin = script.Parent coin.Touched:Connect(function(hit) local player = game.Players:GetPlayerFromCharacter(hit.Parent) if player then coin:Destroy() end end) ☐
- Count it. With your instructor, connect the coin to the score using a LocalScript or leaderstats, so the label goes up by 1. ☐
- Balance it. Place 5 coins. Put the hardest coin somewhere risky. Is it worth the risk? ☐
One mechanic
Add ONE mechanic that makes your game yours: collect, avoid, race or build.
Finish line: Coins disappear when touched and your score changes.
What I built: ____________________________________________
One thing I fixed: _______________________________________
Check
- Which event runs when something bumps into a part?
- ☐ Clicked
- ☐ Touched
- ☐ Changed
- ☐ Spawned
- Why check GetPlayerFromCharacter before destroying the coin?
- ☐ So only players collect coins, not falling parts
- ☐ To make the coin spin
- ☐ To save the game
- ☐ It is not needed
Techie Factory · techiefactory.com