Introduction
Good Morning or Evening to whomever is reading this,
Not too long ago I created a topic about starting a story game, after a few months of writing down and thinking about the story plot, I’ve come to a dead end at what I’m able to do. The reason, I can’t afford to hire anybody so I have to do this on my own.
What do I want to achieve?
I want to create a game, a story game if I can. I’ve written down the plotline and somewhat of how I expect the game to run, but there’s a massive issue with that.
What is the issue?
The issue at hand is, I can’t script or build, like at all.
What solutions have I tried so far?
Youtube tutorials to learn the basics, DevForum posts to learn basics, Roblox games like Lua Learning to learn basics, I’ve tried a lot.
Why did that not work?
I don’t understand any type of “scripting words,” for instance what’s an output? The client? The variables? What’s a debounce? Like does it unbounce something? Like a rubber ball, would it make it stop bouncing?
Summary
In conclusion, what is the best way, for somebody who has NO IDEA about anything script wise, to learn to be able to script an entire seven part story game, with a lobby, and cutscenes and everything. I don’t have a set date to finish by, just want to be done with the first part by 2025. Is that even possible for me to do? Am I just a lost cause? Should I even continue this project? Or let it die off like all my other dreams?
Indeed, scripting can be a bit challenging at the start, I have personally been doing it for some years now, and yet I still make mistakes. However, there are tons of tutorials on the internet & the Roblox Luau documentation is pretty useful too, but as you said you have no experience at all in programming I’d recommend learning the core concepts & then start with simple projects at first, because if you start with something complex, honestly you won’t be able to do it, and that will make you less motivated, and eventually you’ll give up.
No, don’t let your dreams die, keep trying no matter what.
First, you need to understand the concept of programming. Programming means to write a set of instructions using a specific language (Lua in this case) for the computer to execute. Let me give you a quick overview on some of the basics that you need to know.
1) Variables
Think of variables like cardboard boxes. You can store things in it, replace things in it as well as remove things from it. Here is an example:
-- You can use 2 dashes before a sentence to make it a comment. This part of the code will not run.
local myUsername = "TheBrainy06" -- This variable is being assigned a string. Here, local is used to tell the computer that it's a variable and "myUsername" is the variable name.
local myNumber = 7 -- This variable is being assigned a number
print(myNumber) -- the print function is used to display things on the output mainly used for debugging purposes.
2) Loops
Loops are used to execute a piece of code until a certain condition is met or sometimes even infinitely. There are multiple kinds of loop in lua. However, we will only be focusing on 1 kind of loop for now.
-- This is a while loop.
while true do -- while the condition "true" is true, run the code below. This will run infinitely as true is always true.
print("hello there")
task.wait(1) -- This will pause the script for a second to prevent studio from crashing.
end
3) Functions
Functions are a set piece of code which can be run multiple times without having to copy and paste the code multiple times.
function SayHello() -- This creates a function with the name "SayHello"
print("hello!")
end
SayHello() -- Call the function so the code inside the function runs. This can be called as many times as you want.
These are some of the basics you will need to know. If you have any further questions, feel free to ask it here in the devforum. Hope you enjoyed this quick and short explanation.
(Please forgive me if you find any mistakes as I am writing this on my mobile phone)
Scripting can be a very tough thing to learn, however don’t let it stop you from making your game. Watch some videos and find out the basics, refer to the developer hub if you’re confused about something, or ask questions on the devforum if you need help.
If you do end up learning and becoming really good at scripting, promise me you won’t make a simulator, alright?
output is for stuff like printing things and if errors show up u should have it on at all times
the client is the player and local script is the players script u can use stuff like userinputservice for local scripts cuz its for the player not the client which would be a regular script
variables are things u can define like strings and numbers, services and u can also change it if u want
if not (varible) then end that kinda stuff
debounce is simple stuff that has to do with boleans like true and false it helps with cooldowns so u cant spam stuff i think i used it in my sprint script
local UserInputService = game:GetService("UserInputService")
local Player = game:GetService("Players").LocalPlayer
local RunSpeed = Player.Stats.Speed.Run
local Humanoid = script.Parent.Humanoid
local LastW = tick()
local Sprinting = false
UserInputService.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.W then
if tick() - LastW < 0.3 then
Sprinting = true
Humanoid.WalkSpeed = 7 + RunSpeed.Value
end
LastW = tick()
end
end)
UserInputService.InputEnded:Connect(function(input)
if input.KeyCode == Enum.KeyCode.W then
if Sprinting == true then
Sprinting = false
Humanoid.WalkSpeed = 7
end
end
end)
Anyone can script, ANYONE. It’s all about putting the effort in, you won’t be a master at it overnight. If you come across a bump, don’t avoid it, learn from it! That’s the best way to learn, in my opinion.