#i cant figure out why my Enemy model is touchable in my td game
1 messages · Page 1 of 1 (latest)
I think u can use humanoidrootpart but I'm not rlly sure
i tried that i asked gpt and they said the same thing even collision group thing didnt work
how do other tower defense games do it?
they dont use gpt
There is a tut on YouTube that is like 3 years ago
It has like more than 10 episodes I think
U can check it out
It has millions of views btw
How did CollisionGroups not work?
Did you make a new CollisionGroup and assign the collidable parts in the enemies to it? You also have to edit what the group can collide with in the CollisionGroup editor
Jerk bag I asked a simple question to it now your blocked
Ya not sure I need some help cuz I don't get why I even made it's root not have collision and I still walked into it
Okay, so enemies can be touched by players, yes? Like they can push them off course?
ya i dont have a system made or anything im new to this and new to scripting and idk if this is a studio bug but for some reason some times when i hit play and try to walk something stops me for a sec\
this is what i got so far
the pathfinding works
Are you using MoveTo to move the enemies?
what you mean for me the player?
Do you have enemies implemented at all? I'm a bit confused.
Do you have two separate issues? The player stopping & being able to collide with enemies?
just this guy for testing idk how to do the thing with making them spawn in like that im still learning
Okay, so that enemy, it moves along like normal.
But the issue being the player can touch it.
Is that right?
ya and i can move it off the course which i dont want
should this be called Enemy or is this right?
Does the enemy have that collision group? Any part on the enemy that can collide has that?
it does and it still dont work
** You are now Level 7! **
Can you show me the fact that you set the collision groups by taking a screenshot of the enemy's CollisionGroup properties on the root part?
What about the player? They need the collision group too. That you may have to set in a script when the game starts
Well the player's PrimaryPart is the only thing that can collide. So you have to place a script that, when players are added, sets their PrimaryPart's collision group to "Player"
It happens when the player joins.
I think I made a little mistake, so let me clarify:
the Players service has a PlayerAdded event that fires whenever a player joins. Each player has a CharacterAdded event that fires whenever a player's character is spawned in.
If you were to connect to new player's CharacterAdded event, you could set their PrimaryPart's CollisionGroup
The player's characters need to spawn in, so you can't do it in Studio. You'd have to make a server script for this.
fudge ok ty for letting me know
oh noes