I already have the pickup block script but I can't place it down. Can anyone help me and add the script to place the block down to anywhere I click my mouse? thank you

Here is my code

local tool = script.Parent.Parent local click = script.Parent.ClickDetector

local function pickup(player) tool.Parent = game.Workspace [player.name ] end

click.MouseClick: Connect (pickup)