I want to make this script to chose the Children inside the Arc folder randomly instead of following numeric orders (as shown in this video: https://streamable.com/bfrjo4). inside the folder, there’s A1, A2, A3 and so on til A12.
script.Parent.MouseButton1Click:connect(function()
for i,v in pairs (workspace.Folder.Arc:GetChildren()) do
task.wait(.5)
for i,w in pairs (v:GetChildren()) do
if w.Name == "rotator" then
w.UpDown.TargetAngle = 135
end
end
end
end)
What i meant by random is that, instead of it doing like what’s in the video, I want them to go by random. like A2, A7, A3, A1 etc. First time scripting so I get a bit confused on these yet
script.Parent.MouseButton1Click:Connect(function()
local arcsList = workspace.Folder.Arc:GetChildren()
for i in #arcs do
local randomArc = table.remove(arcsList, math.random(1, #arcsList))
for i, v in randomArcs:GetChildren() do
if v.Name == "rotator" then
v.UpDown.TargetAngle = 135
end
end
task.wait(.5)
end
end)
Ahh, my bad arcs should arcsList. Just make sure the folder in which contains the arcs is named Arcs or just edit the line of code at the top, it’s yo choice.