How do I get the CFrames of the children?

I am working on a small thing just for coding practice. I want to move Angler across the pink waypoints. I have figured out a plan which is to lerp the Angler to all the waypoint CFrames and have the waypoint CFrames in a table. The waypoints are all in a folder, I want to get the folder’s children and/or the children’s CFrames in a table

local Waypoints = workspace.Waypoints:GetChildren()

I tried to look for a solution on the forums but couldn’t find anything.


(Angler and all the waypoints, the Angler is just a placeholder for now)

local Waypoints = {}::{[Instance]:CFrame}
for i,v in workspace.Waypoints:GetChildren() do
	Waypoints[v] = v.CFrame
end

This method loops through all the children in the Waypoints folder, and indexes their CFrames in the Waypoints table as instances.

Let’s say the first Waypoint is called “Bob”, Waypoints[workspace.Waypoints.Bob] would return Bob’s CFrame, as long as Bob was a part of workspace.Waypoints when we looped through its children.