#why did it print "you lost" when the bot havent touched the blue part yet?
1 messages · Page 1 of 1 (latest)
Make sure your touching parts are anchored
The part itself is not anchored and triggered that event just by falling onto the baseplate
check if enemy in base is an enemy
like add a tag
I would make a module loader and then have all my classes inside that
and then load them
then have a start function
to rage them all
tag*
so then you check their tag and you can call functions on it
there is no filtering in your .touched function and it looks like its not anchored so you lost because it touched the baseplate
Im at school ill try it when i gor home thanks for the help
it worked tysm
it solved i see but touched is not good idea to detect when enemy gets to your base.
why
isnt it just execute the code when an enemies touches it
it just not good, you can do something like when all waypoints are done or just placing print("you lost") after this thing
why did i havent think of that 😭
** You are now Level 1! **
but i plan to make multiple "bases" and moveable "bases" mechanic for my game
for example a map may have 2 bases and if something happens the bases will move
think of it like arknights tower defense mechanic
wait actually nvm i can just put them codes after nvm nvm mb gng
tysm for the tip
you still can manage it without using .Touched
sometimes touched works not right
even if lkook
at your video
touched worked 7 times
and if you planning to add base health
sometimes it will deal damage wrong
actully you can modificate script
to make touched work 1 time
but it still not very good idea
to use .Touched
okay tysm i changed to code so when the waypoint = 3, but are there any way to execute it when waypoint = the last point (for example the waypoint can be 26 and i have to set the script to execute at waypoint = 26 ion wanna do that
Okay so i tried to set up the base hp but theres no way i can know in the other script that the waypoint (in this script) is = 3
I put that waypoint script inside the rig
For example in the move script i can set up the waypoint so that when the npc touch the part it will increase the waypoint value +1 but the waypoint value is only visible and changeable in that move script, if i try to find that waypoint value inside serverscriptstorage i cant
I think i put the move script inside a module script and require it ?