How do you make a part button and when you click it a part will appear and when clicked again it will disappear? Any answers?
✓ ANSWER ACCEPTED
How do you make a part button? (See description)
1 answer
✓ Accepted answer
You have to insert a clickdetector into that part. then you add this script:
local NewPart = game.Workspace["New Part"]
script.Parent.ClickDetector.MouseClick:Connect(function()
if NewPart.Transparency == 0 and NewPart.CanCollide == true then
NewPart.Transparency = 1
NewPart.CanCollide = false
elseif NewPart.Transparency == 1 and NewPart.CanCollide == false then
NewPart.Transparency = 0
NewPart.CanCollide = true
end
end)
You can change "New Part" to whatever you have named that part
PS: I have a question to: look at my account to see it
3 comments
0
Thank you for the answer! Gladly appreciate that!
0
That's nice to hear
0
Your Welcome!
This discussion is preserved as it was. New answers, comments, and votes are closed.

5 comments
Can you explain this a bit more? Are you looking to make an inventory? Or clicking a button to spawn a part within the workspace?
Uh like are you looking to click a gui button that toogles another gui?
im thinking the second one
he means when a part button is clicked, a "part" will appear and when it is clicked again, then the "part" will disappear
yeah your right