part position copier
Key Required

part position copier

[UP] Just a baseplate.x4axqx4axq 631 views 36 executesUpdated Feb 15, 2026
5.0/ 5(1 votes)
10100% Positive
Lua Script•128 lines (3776 chars)
local UserInputService = game:GetService("UserInputService")
local Players = game:GetService("Players")
local StarterGui = game:GetService("StarterGui")

local player = Players.LocalPlayer
local mouse = player:GetMouse()

-- 
local SELECTION_KEY = Enum.KeyCode.LeftControl 
local HIGHLIGHT_COLOR = Color3.fromRGB(0, 255, 255) 

local selectedPart = nil
local originalColor = nil
local selectionBox = nil

local function createSelectionBox(part)
    if selectionBox then
        selectionBox:Destroy()
    end
    
    selectionBox = Instance.new("SelectionBox")
    selectionBox.Adornee = part
    selectionBox.Color3 = HIGHLIGHT_COLOR
    selectionBox.LineThickness = 0.05
    selectionBox.Parent = player.PlayerGui
end

local function copyToClipboard(text)
    if setclipboard then
        setclipboard(text)
        return true
    elseif syn and syn.write_clipboard then
        syn.write_clipboard(text)
        return true
    elseif clipboard then
        clipboard.set(text)
        return true
    else
        print("Position (copy manually):", text)
        return false
    end
end

local function formatPosition(pos, format)
    if format == "vector3" then
        return string.format("Vector3.new(%.4f, %.4f, %.4f)", pos.X, pos.Y, pos.Z)
    elseif format == "cframe" then
        return string.format("CFrame.new(%.4f, %.4f, %.4f)", pos.X, pos.Y, pos.Z)
    elseif format == "table" then
        return string.format("{%.4f, %.4f, %.4f}", pos.X, pos.Y, pos.Z)
    else
        return string.format("%.4f, %.4f, %.4f", pos.X, pos.Y, pos.Z)
    end
end

local function notify(title, text, duration)
    StarterGui:SetCore("SendNotification", {
        Title = title,
        Text = text,
        Duration = duration or 3
    })
end

mouse.Button1Down:Connect(function()
    if not UserInputService:IsKeyDown(SELECTION_KEY) then
        return
    end
    
    local target = mouse.Target
    if not target then return end
    
    if target:IsA("BasePart") then
        if selectedPart and selectedPart.Parent then
            selectedPart.Color = originalColor
        end
        
        selectedPart = target
        originalColor = target.Color
        
        target.Color = HIGHLIGHT_COLOR
        createSelectionBox(target)
        
        local pos
        if target:IsA("Model") then
            pos = target:GetPivot().Position
        else
            pos = target.Position
        end
        
        local vector3String = formatPosition(pos, "vector3")
        local cframeString = formatPosition(pos, "cframe")
        local simpleString = formatPosition(pos, "simple")
        
        local success = copyToClipboard(vector3String)
        
        if success then
            notify("Position Copied!", 
                   string.format("%s\n\nAlso available:\nCFrame: %s\nSimple: %s", 
                   vector3String, cframeString, simpleString), 
                   5)
        else
            notify("Position (no clipboard)", 
                   vector3String .. "\n(Check console/F9 for all formats)", 
                   5)
        end
        
        print("Vector3:", vector3String)
        print("CFrame:", cframeString)
        print("Simple:", simpleString)
        print("Part Name:", target.Name)
        print("Part Path:", target:GetFullName())
        print("=======================")
    end
end)

UserInputService.InputEnded:Connect(function(input)
    if input.KeyCode == SELECTION_KEY and selectedPart then
        if selectedPart.Parent and originalColor then
            selectedPart.Color = originalColor
        end
    end
end)

notify("Position Copier Loaded", 
       "Hold LEFT CTRL and click any part to copy its position!", 
       5)

print("Hold LEFT CTRL and click any part to copy position to clipboard")

Features & Information

allows you to copy any part position open source works all games toggle is left ctrl + left click -- hold down left ctrl

Community Comments (0)

No comments yet for this script.

More Scripts for [UP] Just a baseplate.