Unable to cast Instance to CoordinateFrame

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear! im making a TD game and im trying to make a efficient mob system.

  2. What is the issue? Include screenshots / videos if possible! Unable to cast Instance to CoordinateFrame.

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

	for i, entityID in pairs(currentEnemys) do
		for i, entity in pairs(workspace.CurrentEntitys:GetChildren()) do
			local Root = entity.HumanoidRootPart
			local Target = 1
			local TargetCFrame = workspace.Targets[Target]
			for i=0, 1, 0.01 do
				Root.CFrame = Root.CFrame:Lerp(TargetCFrame,i) --error line
				Target += 1

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

I think the CFrame is missing from TargetCFrame.

local TargetCFrame = workspace.Targets[Target].TargetCFrame

that fixed it but it wont go to the next waypoint and its inside the ground