Need help with troop and enemies controls and hiring people

the last one i made is outdated how do i get my towers to work and my enemies movement working i am trying to remake vault tower defense heres code

local enemyData = {
[“HP”] = 100;
[“Node”] = 1;
[“CFrame”] = CFrame.new(workspace.Nodes[1].Position, workspace.Nodes[2].Position)
}

game:GetService(“RunService”).Heartbeat:Connect(function()
enemyData.CFrame = enemyData.CFrame:ToWorldSpace(CFrame.new(0, 0, 1))

if (enemyData.CFrame.Position - workspace.Nodes[enemyData.Node + 1].Position).Magnitude <= 1 then
	enemyData.Node += 1
	enemyData.CFrame = CFrame.new(workspace.Nodes[enemyData.Node].Position, workspace.Nodes[enemyData.Node + 1].Position)
end

end)

heres more

local module = {}

module[0] = {
TimeOver = 2,
Enemies = {}
}

module[1] = {
[“TimeOver”] = 2,
[“Enemies”] = {
{
[“Name”] = “Walker”,
[“Amount”] = 8,
TimeBetween = 0.75,
TimeUntilNextGroup = 1
}
}
}

return module

hello if anyone would join me in a remake of a game project a remake of vault tower defense i need a scripter and modeler/gui maker and i will be the person to give the ideas to yall if you want to join:D edit btw

2 Likes

i new at coding tower defense games i suck pls help

1 Like

why aint i getting no comments pls reply with what was i doing wrong

1 Like

Hello!

Not entirely sure on how you want walking to be, but you might wanna use Humanoid:MoveTo(), this basically just walks to a position you give it.

So what I’d do is make a folder full of every position that requires the enemy to go into a different direction then use Humanoid:MoveTo().

Hope this helps!

1 Like

well i aint using humanoids i heard it causes lag

2 Likes

You’d have to use some math to execute this then, though Humanoids do cause lag I don’t think it’s that bad unless you have so many at once.

I’d use Humanoids as of now and if you ever come across a ton of lag then maybe swap, most tower defense games use Humanoids anyways

1 Like

Just came back to also say that you can use :Lerp() or TweenService for every node if you still don’t wanna use Humanoids

ok thanks thanks thankssssssssss

1 Like

#help-and-feedback:scripting-support