Looking for help learning how to script

Hey there, builder with 7 years of experience. I’ve been wanting to try and learn scripting a long time ago, but never really felt up to the task, nor did I know even where to start.

But fortunately, twas not but like 12 seconds ago that I remembered I had a devforum account. So I bestow this oh-so important task upon the scripters of the devforum.

I have little to no knowledge, and still find it hard to know how to make a kill script. Keep in mind this is coming from someone who currently has an F in math and gets headaches the minute they see a statement telling me to “simplify a fraction.”

If possible, please dumb it down to me as much as possible but NOT til the point i cant make out what you’re saying. Either that or explain to me how you got to learn scripting.

3 Likes

Youtube

Dissect community resources

Roblox Documentation

Dissect free models

Dissect uncopylocked games.

4 Likes

Most people can’t grasp the fundamental concepts of scripting within a few months of dedicated practice, with the key being consistent learning and applying what you learn through small projects. Really, no other way to put it. What you learn depends on what you put into it. Research, practice, testing, projects, and goals are something that never ends; they just keep improving.

I’ll avoid long sentences so It’s easier to read and comprehend. I’ll also provide steps in which me and my friends learned scripting.

  1. Understanding the basics. Understanding the language and its features is crucial. For example, learning about existing data types. For this stage, watching tutorials on YouTube is recommended.

  2. Learn about what Roblox offers. This focuses more on do I understand events, and properties, and how to use/manipulate them. I recommend YouTube for this too.

  3. Experimentation. After learning about basic roblox classes such as the BasePart you want to do something with it right? This is where you’ll start implementing logic. Example: A part that kills a player only 1 time. I recommend YouTube, the dev forum, and the documentation as core resources for this stage

  4. Expansion. Expand your knowledge by learning everything about the engine that may be useful. Implement its features to learn more through practical application. You should heavily rely on the Roblox API documentation for this

  5. Can I make this better? This focuses more on optimizing your code, securing your events, organization, error handling, and many more.

  6. Make a game. Don’t start off big but make something just barely out of your reach to push yourself. Personally, I followed these steps and when I was at this stage I made a last-to-survive game for me and my friends.

  7. Most importantly don’t treat this like a chore/job. Make it fun by creating fun things along the way. For example, at stage 3 you can use raycasting to make a basic gun.

  8. This ain’t needed but I find solving issues on the dev forum to be very helpful. Sometimes I encounter problems others face that I don’t recognize so I do my research to find an answer. This helped me a lot because I knew the engine better and I got to apply my skills in different ways due to everyone having different structures

This is an oversimplified path but it should help you create your own method of learning

2 Likes

Honestly just watch tutorials or just think up of something to do, like making a kill brick and use the internet for support. Break it down into steps, for example detecting when the part is touched, and get a good understanding of how that works and them move onto the next step, finding out if the part that touched it has a humanoid or not and so on. You’ll learn along the way, I never “learned” how to script I just wanted to do something and researched how I would go around doing that and struggled a lot at first. Over time I learned how to some certain thinks worked and can use it without the support of the internet but I still often use it for new things or just when i forget something. At first almost all your code is going to be copied but eventually you will just know how to do more and more and start making progressively more challenging things. I am by no means an expert but I know a good amount.

the creator hub is the most important resource for development, you can find it here at Documentation - Roblox Creator Hub and it basically tells you everything; i can’t exactly remember how i learned lua’s syntax 9 years ago but i’m pretty sure it was to do with youtube tutorials

Having a goal is a lot easier. I can’t learn from videos, tutorials, or anything. Dive-in head first with a challenge and just do it. If you’re not creative, find someone who wants some basic scripting done.

Things from when I started out:
image
image


Code sample:

local BindEvent = game.ServerStorage.ServerEvents.PurchaseItem
local ItemsFolder = game.ServerStorage.PlayerItems

local Items = {
	["Sword"] = {
		Cost = 50,
		Item = ItemsFolder["Sword"]
	},
	["Painting"] = {
		Cost = 15,
		Item = ItemsFolder["Painting"]
	}
}

BindEvent.Event:Connect(function(Player : Player, ItemName : string)
	if typeof(ItemName) ~= "string" then warn("Item name not string!") return end
	if not Player then return end
	if not ItemsFolder:FindFirstChild(ItemName) then warn("Item not found store.") return end
	
	if Player.Backpack:FindFirstChild(ItemName) then return end
	
	
	local leaderstats = Player:FindFirstChild("leaderstats")
	if leaderstats then
		local Coins = leaderstats.Coins.Value
		if Coins >= Items[ItemName].Cost then
			local CalculatedAmount = Coins - Items[ItemName].Cost
			leaderstats.Coins.Value = CalculatedAmount
			
			ItemsFolder[ItemName]:Clone().Parent = Player.Backpack
		end
	end
end)

Organization:
image

1 Like