i should re-name the parts named “path” to a name which fit with the era model
Yes and when you use v:isA('BasePart') and v.Name == 'Name goes here'
it should determine the right path for the button.
add the singular quote mark, I forgot to add it
you didnt add an end quote after basepart
So I’ve done the following: I’ve created 2 guis, one for era 1 and one for era 2 (these are examples). With borders for their equivalent time periods.
local button = script.Parent
button.MouseButton1Click:Connect(function()
for i, v in game.Workspace.Folder:GetDescendants() do
if v.Parent.Name ~= 'Wall' and v:IsA('BasePart') then
v.Transparency = 1
else
if v:IsA('BasePart') then
if v.Transparency == 0 then
v.Transparency = 1
else
v.Transparency = 0
end
end
end
end
end)
The buttons on the left i’ve labelled as Era1 and the ones on the right as Era2
This is the end result:
And here is a photo of my explorer so far and how i’ve organized it:
There are way better ways to optimize this code but this is what i’ve rushed right now. I also forgot to mention but this code can be applied to the state lines as well.
i changed the ‘Country’ part, the border go invisible, just not visible again, changed the second transparency to 0, but now the other borders show up again
we’re glad to have helped you out with this issue, if you’ve got any more questions, we’ll try to help.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.