I made a ClickDetector brick that would spawn a part on top of it whenever a player clicked on it. It isn't working, unfortunately.
script.Parent.ClickDetector.MouseClick:connect(function()
x = Instance.New("Part")
x.BrickColor = BrickColor.New("Institutional White")
x.Position = Vector3.New(12.5, 43.4, 29.5)
x.Size = Vector3.New(1,1.2,1)
x.Material("Foil")
x.Shape("Ball")
end)
(I'm not good with scripting so it would be amazing if I could get this to work)

2 comments
It hasn't changed anything. Line 2 is still red, and I have no idea why.
'.new'. Try .new, without a capital N.