Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

How to weld a model to player's torso? [closed]

Asked by
Sindrotex -41
6 years ago
Edited 6 years ago

well uh read the title...

0
i tried many things but nothing worked Sindrotex -41 — 6y
0
Your question is a bit confusing. A backpack in itself is not a tool but contain tools. A backpack store tools. So is it that you want a custom backpack or tools that doesnt use the "orange hammer" item that is default by roblox Hakurem 30 — 6y
0
i just wanna weld something to player's torso when they join the game Sindrotex -41 — 6y
0
and i dont know how :| Sindrotex -41 — 6y

Closed as Not Constructive by RubenKan

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

3 answers

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Char)
local Part = Char:WaitForChild("HumanoidRootPart")
local Weld = Instance.new("Weld", Char)
WhatYouWantToWeld.CFrame = Part.CFrame
Weld.Part0 = Part
Weld.Part1 = WhatYouWantToWeld
Weld.C0 = Part.CFrame:inverse()
Weld.C1 = WhatYouWantToWeld.CFrame:inverse()
end)
end)
0
the thing i want to weld gotta be somewhere specific or i can just get it from workspace? Sindrotex -41 — 6y
0
also does it work with unions and models? because this is what i try to weld Sindrotex -41 — 6y
Ad
Log in to vote
0
Answered by 6 years ago

you can try this model of mine, which was months ago, i hope you get what the scripts say: https://www.roblox.com/library/868174364/R6-ONLY-Welding-Basics-by-anphu04

Log in to vote
0
Answered by
Hakurem 30
6 years ago

As shown in the wiki http://wiki.roblox.com/index.php?title=Weld. Note that im using a serverscript.

---- Weld Function taken from wiki (note only 2 parts can weld with this function)----

local function weldBetween(a, b)
    --Make a new Weld and Parent it to a.
    local weld = Instance.new("ManualWeld", a)
    --Get the CFrame of b relative to a.
    weld.C0 = a.CFrame:inverse() * b.CFrame
    --Set the Part0 and Part1 properties respectively
    weld.Part0 = a
    weld.Part1 = b
    --Return the reference to the weld so that you can change it later.
    return weld
end


--- NOTE: if its r15 Torso is called LowerTorso or UpperTorso. In r6 its Torso. For simplicity lets use HumanoidRootPart

game.Players.PlayerAdded:connect(function(player)
    player.CharacterAdded:connect(function(character)

        local ChosenPart = ""-- place something that you want to weld to torso 
        weldBetween(ChosenPart,character("HumanoidRootPart")


    end)
end)