function Enemy:move(dt) local targetPosition = enemyPath:GetPointAlongPath(self.Model.Position, 1) local direction = (targetPosition - self.Model.Position).Unit self.Model.Position = self.Model.Position + direction * self.Speed * dt end

-- Configuration local CONFIG = { EnemySpawnRate = 5, -- seconds TowerCost = 100, EnemySpeed = 1, }

ReplicatedStorage.EnemyPath = Instance.new("Path") ReplicatedStorage.EnemyPath.Name = "EnemyPath" ReplicatedStorage.EnemyPath.Start = Vector3.new(-100, 0, 0) ReplicatedStorage.EnemyPath.End = Vector3.new(100, 0, 0)

Design a site like this with WordPress.com
Get started
close-alt close collapse comment ellipsis expand gallery heart lock menu next pinned previous reply search share star