So I'm making a game, and I want to have a button that spawns parts? What would I do to customize the part, make a different transparency,meterial,etc. Most importantly though how would I make a custom Cframe, or Vector3 value? Here's the script:
local clickdetector = script.Parent:WaitForChild("ClickDetector")
clickdetector.MouseClick:Connect(function()
local part = Instance.new("Part",game.Workspace)
end)
Hope you can help, thanks!

5 comments
So what is allowNew? And what's peggy, i'm new can you explain these? Is peggy what the part will be named?
why not put the wait after you create the part
You don't need a bool value, just a variable after you define the click detector.(bool variable so you can't spam parts)
No, peggy is not the part that will be named. Peggy is just a variable for the instancing function so that on line 9, I can set the position. allowNew is a bool value to prevent spam you don't need a physical object just make a bool var. @Vulk I did put a wait.
Ok, thanks!