A good scripter has a well-rounded overall knowledge of the language and API. There isn’t really anything that you shouldn’t learn. As for what you should learn first, the best way to figure that out would be by putting together prototypes of games and researching topics in the API as they come up in the development. That’s how I learned and it’s been a very efficient way to gain knowledge without learning stuff I won’t need yet.
Also you shouldn’t worry about how much stuff you know. You will learn as you make more games and stuff. Everyone learns at a different place so take your time if you need to! Of course you should try to learn and try new things but just incase you are you shouldn’t rush that process
Personally for me, I’d learn about Vector3’s, CFrames, and BodyObjects (RocketPropulsions are cool as well)
Thing is, you can start anywhere on the API really & you can already become good just from the knowledge that you know, it just takes a lot of practice & understanding as to know the basic foundations on the types of objects you’re searching for really
There’s no exact/specific API(s) to learn in order to be a good scripter, again practice makes perfect even if it takes 2-3 years
For the build and gun system, you should try to learn ray casting. This is what most people use to make those. For the datastore system its basically just saving the position of each part but of course you should find a way to save this data efficiently and safely
Build/Gun System you could get the Mouse’s Position & Raycast depending on how you want to approach it It’s actually really fun
DataStores on Models/Parts, you’d need to convert them into strings/bools/numbers as you can’t exactly save Instances inside them, but we do have our work-arounds to save them
For the Positions of the Parts you can save all of the X/Y/Z values individually
Don’t try and learn things you don’t need to learn right off the bat. Only learn things that you believe are essential to the code you are trying to make/perfect. The Roblox LUA documentation is full of things, many of them you may never even use. It’s not worth it trying to learn all of the worthless stuff while you could be spending more time learning about the things that are actually useful.
I do believe simple things such as functions, variables, conditional statements, etc. should be learned relatively quickly, as they are apart of almost every coding language, however I wouldn’t worry about trying to learn everything that is exclusive to Roblox LUA.
Don’t be afraid to use google to look up some documentation you don’t understand, or looking for some help on something. The best of the best do the same thing I’m pretty sure.
Learn to not be afraid to look at docs. The most experienced developers still look at docs. Don’t think because you need to reference documentation means that you’re not a good programmer. Software is constantly changing and evolving, beta features are being tested and implemented. Look for new things. I’ve taken about 4 CIS classes at college and the biggest point they drive is to know how to search and use docs to your advantage. Understand why they’re there as a resource.
--Example A: Raycasting - Gun
local Player = game.Player.LocalPlayer
local Event = game.ReplicatedStorage:WaitForChild("RemoteEvent") --We want to send a RemoteEvent from the client-server to receive it's Mouse Position
local Mouse = Player:GetMouse()
local Tool = script.Parent
Tool.Activated:Connect(function()
Event:FireServer(Mouse.Hit.Position) --Position would be a Vector3 Value
end)
Raycasting has a couple of things to keep in mind about:
RaycastParams you can assign, where you can filter out certain parts you don’t want to detect using the Whitelist/Blacklist (But that’s optional)
Having a Ray Origin (Starting Point) & Ray Direction (Direction where you want the bullet to fire)
--Server Script that would handle the Raycasting
local Event = game.ReplicatedStorage:WaitForChild("RemoteEvent")
Event.OnServerEvent:Connect(function(Player, MousePos)
local Params = RaycastParams.new() --Creating our Parameters
Params.FilterType = Enum.RaycastFilterType.Blacklist --This will detect anything except whatever we put inside our "FilterDescendantsInstances"
Params.FilterDescendantsInstances = {Player.Character} --We don't want to detect the Character that fired the ray lol
local Distance = 500 --You can change this to how far you want the ray to go
local RayOrigin = Player.Character.HumanoidRootPart.Position --This is where the Ray would start out
local RayDirection = (MousePos - RayOrigin).Unit * Distance --This is where the ray would go
local Result = workspace:Raycast(RayOrigin, RayDirection, Params) --We'll fire a ray here
if Result then --Checking if the Ray hit something, if it does we can confirm a check
print("The ray hit something!")
end
end)
Sure it may look a bit complicated, but if you dumb it down a bit then you can hopefully understand it a bit better!