well uh read the title...
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)
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
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)
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?