As I said, I have a tower defense game where the enemies walk down the path. The only problem is they walk into each other and I don't know what to do I have tried using collision groups,turning can collide off and various scripts. This is truly my last resort.
COMMUNITY QUESTION
I have a tower defense game and the NPC's walk into each other clogging up the path. Any help?
1 answer
The enemies are following eachother. You need to put a line in the code that makes them not chase eachother. Let's assume "target" is what the enemy is chasing, and the enemy's name is "Enemy"
if target.Name ~= "Enemy" then
--script to follow the target
end
This discussion is preserved as it was. New answers, comments, and votes are closed.

10 comments
what stops the collision groups from working?
To be honest...I don't know I am a new scripter and this is confusing but an error message doesn't show up
Does it just work forward normally and then from nowhere turns around and walks into the other one?
I can take a look at it in studio if you have some sort of demo for me to test
I have the link: https://web.roblox.com/games/3978001738/Tower-Defense-test Good Luck!
Also any tips on how to make it better would be appreciated
So, you're saying you've turned CanCollide off? If you are, then of course the NPCs would walk into each other. Collide means to crash into or to walk into something, so CanCollide means like 'can crash'. So turn on the CanCollide button.
turn off cancollide on the npcs lol
No ^. It's not that simple.
Thanks guys but sadly this hasn't worked