How can i improve my scripting skills?

I started learning lua. However, i learn most of the basic things, but i dont know how to improve. I dont want to make a full game. wut should i do? any task that i can do?

6 Likes

Try to watch some advanced scripting tutorials on YouTube and try to code more advanced scripts like proximity prompts if you don’t already know proximity prompts.

1 Like

any task that i can do? like what can i try to make?

2 Likes

well, what do you want to make?

What is stopping you from making that thing?

If so then there is your point to improve on.

For me it was CFrames, user input services, and physics constraints to do turrets and vehicles. Starting with a basic car kit from roblox’s tutorial, then I went bonkers with a self balancing unicycle. Then I moved on to controlling NPCS to ride on like a horse with Humanoids.

My next step should probably be to practice and do GUI in an organized fashion plus advanced like multilayer with viewport frames, never done that before.

What about you?

3 Likes

A Proximity Door.

If you don’tknow how to do a proximity function, here’s how you do it.

You insert a script into a proximityprompt and do this.

local proximitypromt = script.Parent

proximityprompt.Triggered:Connect(function()
-- code goes here.
end)

Work your way up. Start by making a door, and then make a light you can turn on and off, and then eventually reach more and more complex things

1 Like

is it ok if i flex that i made body tracking, and live audio?

1 Like

I have some scripts for you, maybe its helpful for you to get better in scripting :slight_smile:

-- == equality
-- < less than
-- > bigger than
-- <= less than or equal to
-- >= greater than or equal to
-- ~= inequality


-- here the print command will put the name into the message --
name = "max"

print("hello I am", name)

-- here it puts the result into the message, its calculating so its math --
number = 10 + 54

print("the result of 10 + 54 is", number)

-- here it puts a random number into the message --
print("I choose a number between 1 and 10! It is: ", math.random(1, 10))

-- here it calculates between 2 random numbers, it puts the result into the message --
randomresult = math.random(1, 10) + math.random(1, 20)

print("hhmmm I will choose 2 random numbers and then I am gonna calculate them together... it is:", randomresult)

-- uh... I dont really know whats that for lol, dont use it --
print(string.format("Pi = %10f", math.pi))

-- here it will put :( if the age is under 10 and if the age is over 10 it will print :D --
age = math.random(1, 10) + math.random(1, 10)
print("if my age will be under 10 I will print [:(] and if its over 10 I will print [:D]:", age)
if age > 10 then -- the > checks if its more then 10
	print(":D")
elseif age < 10 then -- if its under 10 it prints :(
	print (":(")
end

-- here it decides if its true or false, if its true your age is over 18. If its false your age is under 18 --
age = math.random(10,25)

canvote = age > 18 and true or false
print("Can I vote?:",age, tostring(canvote)) -- you use tostring if you need to value to a number I guess

-- here it will copy each number until it hits 3, when it hits 3 it will break the loop --
i = 1

while (i <= 10) do
	print(i)
	i = i + 1
	
	if i == 3 then
		break
	end
end

-- here the script will guess the number until it hits 15, if it hits 15 it will stop and tell you that it just hit 15 --
repeat
	guess = math.random(13,16)
	wait(2)
	print("Enter your guess:", guess)
	
	
	
until guess == 15
if guess == 15 then
	wait(1)
	print("I did it! It was 15!")
end

--
x = 10
y = 7
a = 4

result1 = x + 5
result2 = y - 6
result3 = a * 4
print ("The results should be 15, 1 and 16!:", result1, result2, result3)

-- this is for a model in workspace where it gets the children of the model and selects the children with i, v. then it turns every brick red and it changes the material to neon
local Model1 = game.Workspace:FindFirstChild("Model1"):GetChildren()
for i, v in pairs(Model1) do
	v.BrickColor = BrickColor.new("Really red")
	v.Material = "Neon"
end

if you dont understand something tell it to me, I might can explain it

1 Like

How i started is by watching videos and FAILING ALOT if i need help i ask thats how i know how to script.

To get better try doing things u haven’t done.

My best advice is to pick a project, and then throw yourself at it over and over again. I taught myself how to code in multiple languages by picking a goal (let’s say, making a cluster computer, something I’m doing right now with Bash, MPI, and C++), and learning everything I needed to accomplish it. Whether that meant Google searching, reading a book, or talking to someone, it didn’t matter, and it still doesn’t. I will warn you that this method is very time consuming. I cannot express how many times I have spent multiple hours (sometimes days) on a single issue that took 5 minutes to fix. However, it is very rewarding. That doesn’t mean do everything from scratch, but you ought to pick a project you can’t steal in its entirety from someone else. No copy and pasting code; rather, you should study other people’s code and understand what it is doing. Then you should write your own implementation (with some exceptions, such as using libraries and tools. You don’t need to write a compiler to learn C, for example).

A good starting point might be making some basic libraries, like a script backend for an in-game logic gate system. You don’t need to actually make a game for that, but you could.

1 Like