I want to create a script that makes a model visible after pressing an button for an client only

i should re-name the parts named “path” to a name which fit with the era model

1 Like

Yes and when you use v:isA('BasePart') and v.Name == 'Name goes here' it should determine the right path for the button.

1 Like

image

1 Like

add the singular quote mark, I forgot to add it

1 Like

you didnt add an end quote after basepart

1 Like

The borders don’t go invisible anymore, this is the current code

1 Like

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:
image

1 Like

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.

1 Like

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

1 Like

I figured it out!


thanks to everyone who helped!

2 Likes

we’re glad to have helped you out with this issue, if you’ve got any more questions, we’ll try to help.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.