Whats the best way to learn lua?

i been working with lua for around 5 months and still dont seem intermediate,how can i improve my skills as a scripter and as a developer

i can make things such as a side scroller camera,shift to sprint,camera mapulation…etc

8 Likes

For me I had an idea of what I’d want to accomplish at the end of a project, I’d then search the Dev forum or wiki for any topics relating to what aspects of the script I didn’t know how to do, for example; I was making a custom name gui that cycled through every colour, I had made the name etc and it all worked well but I had no idea how to change the colour.

Sure enough a found a post relating to a colour changing brick and edited the code for that.

Each project I do, I do less and less searching. It’s all about practise.

11 Likes

Ty so much,how long have you been scripting in lua

Around the time I joined the forum, I’ve been scripting regularly for about 6 months.

1 Like

How would you rate yourself as a script Begineer,Intermediate?

I usually focus on what I struggle with the most. I usually do a small project or have a goal in mind that involves many different applications of terms, ex. a saving inventory. If I find weakpoints, for me were DataStores, I will practice and get more in depth for them. It’s all about how in depth you go is what I have noticed.

6 Likes

I would say intermediate, I wouldn’t class myself as a professional just because there are still aspects I’m not so confident with. But I’m always learning new things which helps.

You should do a lot of projects. For example, create a tank. Maybe you don’t mathematically know how to make a tank, but you should be able to find someone else’s tank through the toolbox, copy the code, and try to implement it yourself. Being able to read and use other peoples’ code is an important skill for developers.

You should also identify what concepts you struggle with. Maybe for example you are confused about CFrame. Try reading a post about how CFrames work and try to understand it.

10 Likes

usally i would never learn data store for some reason,i’ve been scripting for around 5 months,Im working on a simulator project rn

It varies for the project, I was referring to an example I encountered a couple of months back.

1 Like

so basically i shuld copy the models code,learn how it works,and try to learn how to re-write it?

1 Like

Heres a thing i learned how to script

local player = game.Players.LocalPlayer
local RunService = game:GetService("RunService")
local ContextActionService = game:GetService("ContextActionService")

local jumping = false
local leftValue, rightValue = 0, 0

local function onLeft(actionName, inputState)
    if inputState == Enum.UserInputState.Begin then
        leftValue = 1
        
    elseif inputState == Enum.UserInputState.End then
        leftValue = 0
    end
end


local function onRight(actionName, inputState)
    if inputState == Enum.UserInputState.Begin then
        rightValue = 1
        
    elseif inputState == Enum.UserInputState.End then
        rightValue = 0
    end
end

local function onJump(actionName, inputState)
    if inputState == Enum.UserInputState.Begin then
        jumping = true
        
    elseif inputState == Enum.UserInputState.End then
        jumping = false
    end
end

local function onUpdate()
    if player.Character and player.Character:FindFirstChild("Humanoid")then
        if jumping then
            player.Character.Humanoid.Jump = true
        end
        local moveDirection = leftValue - rightValue
        player.Character.Humanoid:Move(Vector3.new(moveDirection,0,0), false)
    end 
end

RunService:BindToRenderStep("Control", Enum.RenderPriority.Input.Value, onUpdate)

ContextActionService:BindAction("Left", onLeft, true, "a", Enum.KeyCode.Left, Enum.KeyCode.DPadLeft)
ContextActionService:BindAction("Right", onRight, true, "d", Enum.KeyCode.Right, Enum.KeyCode.DPadRight)
ContextActionService:BindAction("Jump", onJump, true, "w", Enum.KeyCode.Space, Enum.KeyCode.Up, Enum.KeyCode.DPadUp, Enum.KeyCode.ButtonA)

Still trying to modify it

Okay, out of all of that, did you struggle with anything?

If yes, then what? Focus on that and try and get really in-depth with how to do it, and the possible ways.

If no, try something you haven’t done before.

1 Like

i struggled on this part the most

RunService:BindToRenderStep("Control", Enum.RenderPriority.Input.Value, onUpdate)

ContextActionService:BindAction("Left", onLeft, true, "a", Enum.KeyCode.Left, Enum.KeyCode.DPadLeft)
ContextActionService:BindAction("Right", onRight, true, "d", Enum.KeyCode.Right, Enum.KeyCode.DPadRight)
ContextActionService:BindAction("Jump", onJump, true, "w", Enum.KeyCode.Space, Enum.KeyCode.Up, Enum.KeyCode.DPadUp, Enum.KeyCode.ButtonA)

if i scripted for another 2 years in lua,what result would you guys expect out of me ! ?

Results vary for everyone, this is my second year of scripting. I could say 4 years, but technically if I was counting my full work days, then I’d say about 2 years. Results vary for everyone, a thing I learned is to not compare my progression to other peoples, it can demotivate you and can put pressure on yourself to do exceedingly better. Stick at it, everyone gets to a certainly level at some point, nothing is meant to be easy.

3 Likes

Thank you so much for the tips,around in a week i was going to try to make a camera system like Dungeon Quest(wherever yourr mouse goes your player looks)

1 Like

One big misconception is that you don’t really “learn to script” in the way you think one would. Sure, you can take certain classes like Codecademy, but you’re only learning the syntax of the language. Don’t get me wrong, syntax is incredibly important, but it’s only the base of what you do.

You learn as you go. For example, I consider myself a pretty experienced scripter in areas such as UI or backend data management, but when it comes to camera or part manipulation, I couldn’t tell you even how to rotate a camera. I just haven’t had a project that requires it yet. What I do is have a specific project in mind, then go one step at a time. Does your project require moving a gui across the screen? Google it and you learn that part. Does it require opening a door for only specific group members? Google that part. Does it require saving a player’s inventory? Google that part.

Over time, as you Google more and more, you learn more and more about Roblox Lua and what it contains. You learn what functions or strategies are better than others. But don’t get ahead of yourself. Don’t go trying to solve problems you don’t have. That’s where it gets to be a bit overwhelming. Just focus on one step at a time until you have a completed project, and I guarantee you, by the time you finish even ONE project, you’ll be able to look back on it and think, “Wow, I could have done that better.” You’ll ALREADY be able to see how you’ve improved. I can think back 2 years to some projects I’ve done in the past and rewrite them to be 5 times better than they were, and it’s just because I’ve been doing this for so long and I’ve Googled so much.

Learning to script in Roblox is an ongoing process that you get better at as time goes on. And don’t go comparing yourself to others. Like I said, I might be good at UI work, but if you compare me to the developers of Jailbreak when it comes to building a car, mine will just be a brick with 4 wheels and the default script that comes with a Seat part.

You’ll grow and you’ll learn and you’ll never stop learning. Never forget that there’s always more to learn, and always try to strive for greatness. With enough effort, you’ll be an amazing scripter in no time.

18 Likes

Oh cool! Well stick at it, you got this, and if you think you don’t come back to it another time when you can. It’s really important and I can not express enough is to not stress over this as well. Have a good, uh night/day? It’s like 2 AM for me here lol.

3 Likes

Gn everyone thanks for the tips and feedback,espically @BreadyToCrumble

1:36 AM for me lol