I don't know what's wrong with this:
function a() game.ServerStorage.Gallardo:Clone(game.Workspace) end script.Parent.Parent.ClickDetector.MouseClick:connect(a)
Assuming this is in a script
and the parenting is correct..
I would usually give a better explanation, but really it's fairly basic.
The :Clone
method has no parameters. So, you would have to make a variable
then parent that variable to the workspace.
I also added in WaitForChild
which waits for 'Gallardo' to be there. Just to be safe!
If the script is in a part
and the ClickDetector is in that part, your parenting should be script.Parent.ClickDetector.MouseClick:connect(a)
You can read more about Click Detectors here
I think you'd have the parenting done well though!
Cheers!
function a() local clone = game.ServerStorage:WaitForChild("Gallardo"):Clone() clone.Parent = workspace end script.Parent.Parent.ClickDetector.MouseClick:connect(a)