if v.Parent.Name ~= 'Country' and v:IsA('path') then
why are you checking for it to be a path? Unless of course it’s classname is ‘Path’ but I assume that you’re using parts to make the border
if v.Parent.Name ~= 'Country' and v:IsA('path') then
why are you checking for it to be a path? Unless of course it’s classname is ‘Path’ but I assume that you’re using parts to make the border
Since the parts inside the model is called “path”
It did make the borders invisible, but everything else became visible instead, and the modern borders didn’t become visible after i pressed it again
Oh I understand. when I do
if v:IsA('BasePart') then
I’m checking for what kind of item it is. For instance, every physical item in a game (that you can touch) is a BasePart or a Part. I’m checking what kind of item ‘v’ is rather than what its name is.
My apologies, I didn’t test the script beforehand
I’m sorry but I’m not following along. This is what shows up for me. Was this your intended effect or was it something else? If you could provide any videos / images, that would go a long way to help me.
So is the issue the fact that you want that yellow country’s borders to be the only one showing up?
you see the black borders appearing? i want that to happen
So the semi transparent lines (shown below) should not be shown at all ?
those are the “state” borders, i don’t want those, those will be for another button
so the way I would tackle this is by making a folder for states and country lines (which you have done, i think)
and check in the script if the parent of the item ‘v’ is not ‘state lines’
change this line
if v.Parent.Name ~= 'Wall2' and v:IsA('BasePart') then
to this
if v.Parent.Name ~= 'Wall2' and v:IsA('BasePart') and v.Parent.Name ~= 'State' then -- The v.Parent.Name ~= 'State' checks to see if it's not a state line
Hold on nevermind I dont think it works
The point of your script is to get your items and see if they’re country / state lines and then show off depending on the button pressed, correct?
And just to clarify, this is a showcase of your game, correct?
the idea is that if you press a “2024” button, the modern day borders show up, if you press again, it goes invisible.
and then that for every era option + rivers + state borders
(no other borders appear unless you click on the specific button with the year on it)
Have you created a folder for the border lines separating and representing the state name or rivers?
You have to retrieve the descendants of the particular model. The button will grab everything that is named ‘path’ if I am correct, it will just loop through the ‘Eras’ folder and return everything that is labelled ‘path’ in the same category from all of your models. You may need to add more variables to thoroughly check if the button is retrieving the right ‘path’ from the model you want to interact with.
If I am wrong and it just doesn’t work entirely. Check for any logical errors by using print statements.