Ok so Im trying to make a tycoon how can I make it that when a player presses this button parts drop from where I told them to well everytime I try this How could I fix this?
script.Parent.ClickDetector.MouseClick(function() local DropperFree = game.Workspace.Dropper1.Dropper local newParts = Instance.new("Part") newParts.Name = "Drops" newParts.Parent = game.Workspace newParts.Position = DropperFree.Position end)
it gives me in output Workspace.Part.Script:1: attempt to call field 'MouseClick' (a userdata value)
You didn't connect it to the function.
script.Parent.ClickDetector.MouseClick:connect(function() -- Right here. local DropperFree = game.Workspace.Dropper1.Dropper local newParts = Instance.new("Part") newParts.Name = "Drops" newParts.Parent = game.Workspace newParts.Position = DropperFree.Position end)