So I've seen some scripts/videos of people creating a block they want in the script, like sizing it, making it the right color ect and then welding it to a player but I would like to weld a specific (slightly complicated) union to a player. Like the Union is already in workspace im just not sure how to get it to weld to player
game.Players.PlayerAdded:connect(function() local Weld = Instance.new("Weld", game.Players.LocalPlayer.Backack.Union) --put the union in starterPack Weld.Part0 = Weld.Parent Weld.Part1 = game.Players.LocalPlayer.Character.Torso Weld.C0 = CFrame.new(0,0,0) * CFrame.Angles(0,0,0) --position the union end)
First we create a weld instance
local w = Instance.new("Weld")
Then we add which two parts its welded between
w.Part0=character.Torso w.Part1=union
Then we can change the way its connected to it, like back one stud up one stud rotated this
w.C0=CFrame.new(0,1,0)*CFrame.Angles(math.rad(90),0,0)--up 1 stud rotated 90 on the x axis
Then we parent the weld, usually to the Part0
w.Parent=character.Torso
Let's put it together
local w = Instance.new("Weld") w.Part0=character.Torso w.Part1=union w.C0=CFrame.new(0,1,0)*CFrame.Angles(math.rad(90),0,0) w.Parent=character.Torso
If you want too make a part get connected to the torso then
IF R15 game:
--Put this in a script inside ServerScriptService --Put the Union inside the ServerStorage game.Players.PlayerAdded:connect(function(plr) --Function when a player joins plr.CharacterAdded:connect(function(char) --Now that the function is done, now what, we have to weld the part/union local w = Instance.new("ManualWeld") w.Part0 = char.UpperTorso --Replace UpperTorso to LowerTorso to get the LowerTorso local union = game:GetService("ServerStorage").Union:Clone() --rename what the union name --is union.Parent = char w.Parent = plr.Backpack w.C0 = CFrame.new(0,0,0) --Change the value you want end end