Roblox Studio
Scripting Examples
Scripting Examples
Roblox Studio
Roblox Studio
Roblox Stuido is a programing environment that allows users to create thier own roblox games using the programming language Lua.
Roblox Stuido is a programing environment that allows users to create thier own roblox games using the programming language Lua.
Here you will find a collection of scripting examples broken down into easy to find categories
Here you will find a collection of scripting examples broken down into easy to find categories
Animations
Animations
Use the animation editor to create an animation and then write a script that plays your animation
Use the animation editor to create an animation and then write a script that plays your animation
Chat Commands
Chat Commands
Check chat messages to set up player commands.
Check chat messages to set up player commands.
Doorways
Doorways
Open a doorway by touching a part near the door
Open a doorway by touching a part near the door
Open a doorway by paying a certain amount.
Open a doorway by paying a certain amount.
Open a doorway by touching a a key to the door
Open a doorway by touching a a key to the door
Fire, Light, Explosions
Fire, Light, Explosions
If a simple oof just isn't cutting it for you try explosions instead!
If a simple oof just isn't cutting it for you try explosions instead!
First Person Shooter
First Person Shooter
How to make a gun
How to make a gun
Make Bullets do Damage
Make Bullets do Damage
Kills / Deaths Leaderboard
Kills / Deaths Leaderboard
Reload, Zoom, Mouse Icon
Reload, Zoom, Mouse Icon
Ammo GUI
Ammo GUI
Health GUI
Health GUI
Ammo Drop
Ammo Drop
Shift to Sprint
Shift to Sprint
Kill Streaks
Kill Streaks
GUI
GUI
A menu that appears when the player clicks on a GUI button.
A menu that appears when the player clicks on a GUI button.
A series on how to set up a shop GUI
A series on how to set up a shop GUI
Run/Walk Button
Run/Walk Button
Switch between running and walking with the simple click of a button!
Switch between running and walking with the simple click of a button!
Allows players to sprint by pressing a GUI button. Allows the player to increase and decrease the sprint speed.
Allows players to sprint by pressing a GUI button. Allows the player to increase and decrease the sprint speed.
Allows players to sprint by pressing a GUI button.
Allows players to sprint by pressing a GUI button.
A way to open a GUI menu such as a shop by clicking on a part in the shop model.
A way to open a GUI menu such as a shop by clicking on a part in the shop model.
A menu that appears when the players first join the game.
A menu that appears when the players first join the game.
Open up your own shop to sell power ups that can be used in your game!
Open up your own shop to sell power ups that can be used in your game!
Item Collection
Item Collection
Leaderboards
Leaderboards
This script sets up a leader board system in your game that can be customize to your games currency or point system!
This script sets up a leader board system in your game that can be customize to your games currency or point system!
Leaderboards...but with creepy faces
Leaderboards...but with creepy faces
A leaderboard system that keeps track of how many times the players in a game die.
A leaderboard system that keeps track of how many times the players in a game die.
Obby
Obby
This script can be added to a part and will cause the player to oof when they touch it! Good for obbies or just to add a "surprise" to your game.
This script can be added to a part and will cause the player to oof when they touch it! Good for obbies or just to add a "surprise" to your game.
Just like the die on touch script but spinning! Great for adding an extra challenge to get around.
Just like the die on touch script but spinning! Great for adding an extra challenge to get around.
This script allow you to move parts around during your game. Can be used in combination with die on touch script to create all sorts of oofing fun!
This script allow you to move parts around during your game. Can be used in combination with die on touch script to create all sorts of oofing fun!
This script sets up a leader board system in your game that can be customize to your games currency or point system!
This script sets up a leader board system in your game that can be customize to your games currency or point system!
Cool magic trick to show your friends. Step on a part and watch as a new one appears out of thin air!
Cool magic trick to show your friends. Step on a part and watch as a new one appears out of thin air!
Allows players to sprint by using the shift button on the keyboard.
Allows players to sprint by using the shift button on the keyboard.
Storing game data on Roblox data store servers to get players game data between sessions.
Storing game data on Roblox data store servers to get players game data between sessions.
A leaderboard system that keeps track of how long players have been in the game.
A leaderboard system that keeps track of how long players have been in the game.
Sends a message through the chat system when a player touches a certain part in the game such as a level ending part.
Sends a message through the chat system when a player touches a certain part in the game such as a level ending part.
Power-Ups
Power-Ups
Add a little pep to your step with a dose of speed boost! Use with caution, or don't, it's just a game after all
Add a little pep to your step with a dose of speed boost! Use with caution, or don't, it's just a game after all
Allows players to sprint by pressing a GUI button.
Allows players to sprint by pressing a GUI button.
This script allows you to wait for it . . . double jump!
This script allows you to wait for it . . . double jump!
I believe I can fly ♫ . . . wait how do I get back down again?
I believe I can fly ♫ . . . wait how do I get back down again?
A tool that when equipped allows the player to click and teleport the position of the mouse.
A tool that when equipped allows the player to click and teleport the position of the mouse.
Remote Events
Remote Events
Connect events that happen on the client side to actions on the server.
Connect events that happen on the client side to actions on the server.
Connect server events to a particular client or player
Connect server events to a particular client or player
Connect server events to all clients or players in the game
Connect server events to all clients or players in the game
Simulators
Simulators
A series on how to create a mining simulator game. How to make tools, how to mine rocks, how to sell resources, and a simple shop system.
A series on how to create a mining simulator game. How to make tools, how to mine rocks, how to sell resources, and a simple shop system.
Click a button get points, simple enough?
Click a button get points, simple enough?
Tired of clicking your mouse for points? Press a key instead!
Tired of clicking your mouse for points? Press a key instead!
Storing game data on Roblox data store servers to get players game data between sessions.
Storing game data on Roblox data store servers to get players game data between sessions.
This script sets up a leader board system in your game that can be customize to your games currency or point system!
This script sets up a leader board system in your game that can be customize to your games currency or point system!
Teleport
Teleport
This script turns a part into a teleportation pad that can be used to teleport players to another part of your game .... or into a dark pit, your choice!
This script turns a part into a teleportation pad that can be used to teleport players to another part of your game .... or into a dark pit, your choice!
Similar to the teleportation pad, but instead you click a button on the screen. Useful if you have multiple locations players teleport to regularly such as shops, lobbies, or checkpoints!
Similar to the teleportation pad, but instead you click a button on the screen. Useful if you have multiple locations players teleport to regularly such as shops, lobbies, or checkpoints!
Another teleportation method, because why not? Now you can teleport by pressing a key on your keyboard!
Another teleportation method, because why not? Now you can teleport by pressing a key on your keyboard!
A tool that when equipped allows the player to click and teleport the position of the mouse.
A tool that when equipped allows the player to click and teleport the position of the mouse.
Weapons, Enemies, and Combat
Weapons, Enemies, and Combat
Introduction to weapon making! Covers how to make a tool and a basic script that plays an animation and deals damage.
Introduction to weapon making! Covers how to make a tool and a basic script that plays an animation and deals damage.
Make a tool shoot lasers by using ray casting (client side only).
Make a tool shoot lasers by using ray casting (client side only).
Series on pathfinding that covers the basics of pathfinding service and how to move humanoind objects. Intro to AI.
Series on pathfinding that covers the basics of pathfinding service and how to move humanoind objects. Intro to AI.
A part that when touched gives the player health. Can be one time use or as a healing zone.
A part that when touched gives the player health. Can be one time use or as a healing zone.
Like the health pickup but gives the player a force field instead.
Like the health pickup but gives the player a force field instead.
Doorway that clears tools players have in their hands or in their backpack. Tools can be deleted or returned to a set location.
Doorway that clears tools players have in their hands or in their backpack. Tools can be deleted or returned to a set location.
A script that assigns players to separate spawn locations in the game
A script that assigns players to separate spawn locations in the game
Sends a message through the chat system when a player in the game has died.
Sends a message through the chat system when a player in the game has died.
A leaderboard system that keeps track of how many times the players in a game die.
A leaderboard system that keeps track of how many times the players in a game die.
Enemies spawn in the game when a player touches a part. Limits on how many enemies can be set.
Enemies spawn in the game when a player touches a part. Limits on how many enemies can be set.
Laser Gun 2.0
Laser Gun 2.0
Make a tool shoot lasers by using ray casting (server side).
Make a tool shoot lasers by using ray casting (server side).
Other
Other