How do you change where a part clone is with script?

Lets say you wanted a part to clone its self when touched. BUT you wanted that clone to go to a different position. How would you do that?


local part = game.Workspace.Part 

part.Touched:Connect(function(hit) 
   if hit.Parent:FindFirstChild("Humanoid") then
      local Clone_Part = part:Clone()
      Clone_Part.Position = Vector3.new(--X,Y,Z Positions) -- put the coordinates that you want
      Clone_Part.Parent = workspace
   end
end)

If you want like it has cooldown on cloning after you touched the part, use debounce

Just assign a Vector3 value to its “Position” property which can be done by using the Vector3 value class constructor, for example Vector3.new(0, 0, 0) will produce a Vector3 value which points towards X, Y and Z (0, 0, 0) in the worldspace, alternatively you can assign a CFrame value to its “CFrame” property instead. CFrame’s are a more difficult concept of Roblox so you may want to stick with Vector3 values for the time being.