I am making a tycoon and the first Object that you can buy is a Click Dropper, but the script that I made will make two Parts instead of one whenever I click the button that I have the ClickDetector in.
script.Parent.ClickPart.ClickDetector.MouseClick:connect(function()
if script.Parent.ClickPart.Transparency == 0 then
local Part = Instance.new('Part', script.Parent.Parent.Parent.DropParts)
Part.Size = Vector3.new(1,1,1)
Part.FormFactor = Enum.FormFactor.Symmetric
Part.BrickColor = BrickColor.new(255,255,255)
Part.Position = script.Parent.DropPart.Position
Part.Anchored = false
Part.CanCollide = true
Part.TopSurface = Enum.SurfaceType.Smooth
Part.BottomSurface = Enum.SurfaceType.Smooth
local Cash = Instance.new('IntValue', Part)
Cash.Name = 'Cash'
Cash.Value = 1
end
end)
Anything would be very appreciated.
