How To Weld A Part With A GUI Button

Hello all, I’m trying to weld a part with a GUI button like a weapon attachment select, but I don’t know how can you help me please. Thanks

1 Like

Anyone please help me, I need this information

Please provide more detailed information regarding your issue.

The issue is, that I don’t how to weld a part with a GUI button. So what I am aiming for is to apply an attachment to a weapon through a GUI button.

I still do not really understand your question. From my understanding, your script should look something like this:

local button = --button
local part0 = --first object
local part1 = --second object

button.MouseButton1Click:Connect(function()
    local weld = Instance.new("WeldConstraint")
    weld.Parent = part0
    weld.Part0 = part0
    weld.Part1 = part1
end)

Yes this what I am talking about