Before you read on i dont need help with a script i need an idea for a script to make! Hello im working on applying for a hiddendevs lua skill role but can think of any scripts to develop. Also if you have an accepted aplication and i could check out your script just to see what a propper level of “sofisticated” is… ik verry vauge. If you have any ideas let me know i need to to be easily over 200 lines of complicated code!
PS: Thanks for any help and if this is the wrong catagory let me know what the right one is.
Uhmmmm… Implementing Dijkstra’s algorithm in Roblox? Have a bunch of nodes and it’ll calculate a path. That said, you should use Kruskal’s and pre-calculate all the paths beforehand to minimise performance issues.
You could create a inventory system with features such as item stacking, sorting, filtering, and maybe even crafting mechanics this might handle data structures, user interfaces and so on, just use ur imagination
yeah it got outa hand lol im not an amazing scripter
ive never realy learnt optimization and im self tought if there is somwhere you know or if you could help me learn that would be realy helpfull
brush up on your fundamentals a bit more before applying. please take a look at tables. I love lua because of how versatile they are - a list, array, OOP, they can be almost anything!
is there a tutorial type video system that teaches this?? ive been doing this solo and self taught… im trying to learn tho
whats wrong with this script?
local Char = script.Parent.Torso
local PFS = game:GetService(“PathfindingService”)
local Human = script.Parent:WaitForChild(“Humanoid”)
local Path = PFS:CreatePath()
repeat
task.wait(0.1)
local AllParts = workspace.Food:GetChildren()
for i, IndividualPart in pairs(AllParts) do
–local Distance = (Char.Position - IndividualPart.Position).magnitude
local ClosestDistance = 2000
local ClosestPart = 2000
for i, IndividualPart in pairs(AllParts) do
local Distance = (Char.Position - IndividualPart.Position).magnitude
if Distance < ClosestDistance then
ClosestDistance = Distance
ClosestPart = IndividualPart
end
end
Path:ComputeAsync(Char.Position, ClosestPart.Position)
Human:MoveTo(ClosestPart.Position)
end
local MaxDistance = 100
local AllParts2 = workspace.Humans:GetChildren().Torso
until false