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

How do I weld this?

Asked by 8 years ago

So here is the problem-When the button is pressed the items are inserted into the propper places, but it's not attached to me, Its just floating in the place, Someone told me i need it to weld it to the player, but I do not know how to do that.That is the problem Here is the script ** Script**

local button=script.Parent
local LeftLeg = game.ReplicatedStorage.Leather.LeftLegWeld.Piece:Clone()
local RightLeg = game.ReplicatedStorage.Leather.RightLegWeld.Piece:Clone()
local Torso = game.ReplicatedStorage.Leather.TorsoWeld.Union:Clone()
local Player = game.Players.LocalPlayer

button.MouseButton1Down:connect(function()
    LeftLeg.Parent = Player.Character["Left Leg"]
    RightLeg.Parent = Player.Character["Right Leg"]
    Torso.Parent = Player.Character.Torso
end)

1 answer

Log in to vote
0
Answered by 8 years ago

Either it is anchored and needs to be unanchored or you need to do:

w = Instance.new("Weld") w.Part0 = Torso w.Part1 = Player.Character.Torso w.Parent = Player.Character.Torso

I assume you don't need to CFrame it...

0
it is anchored TheTermaninator 45 — 8y
Ad

Answer this question