Roblox Studio: Ship Your First Game
Your First Script
Write Lua that makes a part spin forever. Then change one number and see what happens.
Builder handle: ____________________ Date: ____________
Steps
- Make a spinner. Insert a Part, anchor it and name it Spinner in Explorer. ☐
- Add a Script. Hover over Spinner in Explorer, click +, and choose Script. ☐
- Type the code. Replace the starter line with: while true do script.Parent.CFrame = script.Parent.CFrame * CFrame.Angles(0, 0.05, 0) task.wait() end ☐
- Change one thing. Change 0.05 to 0.2. Press Play. What changed? Now try moving 0.05 into the first slot. ☐
Spinning hazard
Turn your spinner into an obstacle the player must time a jump around.
Finish line: A scripted part that moves when the game runs.
What I built: ____________________________________________
One thing I fixed: _______________________________________
Check
- In this script, what does script.Parent mean?
- ☐ The player
- ☐ The part the script is inside
- ☐ The whole game
- ☐ The camera
- What happens if you make 0.05 bigger?
- ☐ It spins faster
- ☐ It stops
- ☐ It changes color
- ☐ It falls
Techie Factory · techiefactory.com