I am trying to stop NPC giant spider from community content from climbing in the script but not sure how to write the script is i need a script .
Are we talking about "giant spider NPC (BOSS)" by justinmcintyre911? Assuming yes:
If you look at it's controller script NPCAIServer you will see a comment at the top
"Will walk over terrain and any objects to get to its objective. To mark objects as not walkable, add to each one a custom property called "Walkable" of type boolean and set to false."
I suggest that you might want to invest some time understanding the AI pathfinding options, in particular:
DDPathfinder by truedarkdev (community content)
NPC AI Kit by standardcombo (community content)
NPC AI Kit Walkthrough
That will give you far better control over how your NPCs roam around and behave.
I would also consider using the core Animated Meshes - Spider, this gives you a fully rigged spider with animations - it was added after the community spiders were made.
Yes the Boss spider NPC, l did read the controller script at the top but had no idea what to do.
Thank you for your help l will check out DDPathfinder by truedarkdev and the other one thanks again.
To prevent that script walking on a specific object: Find the object (e.g. a cube) in your scene hierarchy, select the object and look at the properties panel. At the bottom of the properties panel there is a button "+ Add Custom Property" click this and select "Bool". An add property box will pop-up with a flashing cursor, type in "Walkable" (without the quotes, with the capital W). Click "Add Property" button. You can see that this is going to be quite time consuming for a large map. If you try a test you will also see that if that object blocks line of sight to the player, the spider will not attempt to walk around the object (there's no nav-mesh, so "around" is a complex concept). The whole NPC / Navmesh aspect is quite complex and will take a while to figure out, feel free to post with any problems.