September 20, 2022
Create a new enemyspawn script on the server and require it in the main script on the server.
Write the logic of continuously generating enemies in the enemyspawn script, generate parts at a certain distance around the defense tower at regular intervals, and give them a linear speed to the defense tower.
--Functions executed by timer
Start the game to see the effect.
Add the logic of hitting the enemy and destroying after the logic of creating bullets in the main script of the server.
--Function executed after receiving the "shoot" protocol
Later, the rotation speed of the defense tower and the speed of the enemy can be adjusted as needed. This case is over, and no further attempt will be made.
|Shape of base part|