Tower defense pathfinding

hi im ctg i need help
rn im scripting pathfinding for my td game but it kinda werid


in server side not have any part* only model with attribute

code:

local function TweenEnemy()
		local Path = PathfindingService:CreatePath({
			["AgentRadius"] = 2, 
			["AgentHeight"] = 1, 
		})
		
		Path:ComputeAsync(HumanoidRootPart, Map.Waypoint.End.Position)
		
		for i, v in pairs(Path:GetWaypoints()) do
			Rig:SetAttribute("PathfindingWaypoint", v.Position)
			
			local Tween = TweenService:Create(Value3V, TweenInfo.new(GetTime(v), Enum.EasingStyle.Linear, Enum.EasingDirection.In, 0, false, 0), {Value = v.Position})
			Tween:Play()
			Tween.Completed:Wait()
		end	
	end
1 Like

so long im not use pathfinding so i was relearn it like in 15 mins

1 Like

i dont think this is how tower defense games work , just make enemies walk towards brick and when they touch brick make them move towards next brick

2 Likes

i want make diffrient td, i want creative than make enemy just follow the path (kinda stupid bc no one waste time to follow the path)

btw here is enemy in server side

i dont think the enemies will walk on a different path anyways if all of the enemies are the same

i dont understand why you are trying to hard to make pathfinding , idk how to make pathfinding , but does your level change (moving parts that might change the path)

yes so wat? i can do that bc it the thing i want