How do I make Instances appear where I want them to?

I want to make a script in which whenever a player touches the script, another part goes right next to the part holding the script. The only problem is, I want this to happen to the same part but in different spaces. This is my code so far

local Part = script.parent

function Touch()
Instance.new(Part, workspace) ----I have no clue on how to do what I stated above
end
Part.Touched:Connect(Touch)

Refrain from using the parent argument of Instance.new

It will effect your scripts in the long run in terms of speed.

Do this instead:

local Part = script.Parent

function Touch()
Part.Parent = workspace
end

This should work.

local Part = script.parent

function Touch()
 local part = Instance.new("Part")
 part.Position = Vector3.new(0,0,0) -- put ur location here
 part.Parent = workspace 
end
Part.Touched:Connect(Touch)

Im really new, so how would i use that method?

It’s what @Katrist told you above but replace 0, 0, 0 with your x, y, z coordinates(you can find the x, y, z for a specific object in it’s Object.Position property).

What if i wanted to re-use the script? If i made the part go to the left side of a part and i moved where that part was, would it still go to the left side? or would it just go to the coordinates i added for it.

It will go to the coordinates you manually added.

any way to make it so it goes to the location to the left of the part no matter where it is?

Depends on which way you consider left. If we assume the X axis is our left/right then you can do:

local Part = script.parent

local offset = 5
function Touch()
 local part = Instance.new("Part")
 part.Position = Vector3.new(part.Position.X-offset,0,0) -- put ur location here
 part.Parent = workspace 
end
Part.Touched:Connect(Touch)
local part = script.Parent
local debounce = false

part.Touched:Connect(function(hit)
	if debounce then
		return
	end
	if hit.Parent:FindFirstChild("Humanoid") then
		debounce = true
		local clone = part:Clone()
		clone.Parent = workspace
		clone.Position = part.Position + Vector3.new(4, 0, 0)
		task.wait(3)
		debounce = false
	end
end)

This will create part instances in a line when the player touches the part.
You can also make it so that touched parts no longer create new parts by using the following.

local part = script.Parent
local isTouched = false

part.Touched:Connect(function(hit)
	if isTouched then
		return
	end
	if hit.Parent:FindFirstChild("Humanoid") then
		isTouched = true
		local clone = part:Clone()
		clone.Parent = workspace
		clone.Position = part.Position + Vector3.new(4, 0, 0)
		task.wait(3)
	end
end)