Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I weld a Instance.new part to something in the player Torso so it moves with the player?

I tried this,

local player = game.Players.LocalPlayer
local character = player.Character
local torso = character:WaitForChild("Torso")
local c = Instance.new("Part")
		local w = Instance.new("Weld")
		w.Part0 = c
		w.Part1 = torso
		w.Parent = c
		c.Position = torso.Position
		c.Parent = torso

I'm brand new to welding, so I'm not sure what to do as of right now. If anyone could help out that would be lovely! Thank you!

4 comments

0
0

Thanks! It really helped!

0

Np. :)

0

I looked at the wiki, and this was my final result, https://gyazo.com/08f01755b3f1cc8462fbf9e102372011 It weld correctly but turning is really weird and the character bounces around.

1 answer

Here is a small script i made to make it so that when a player clicks a Gui Button it creates a part and welds it to the players Torso

script.Parent.MouseButton1Click:connect(function()
local part = Instance.new("Part", workspace)
local Weld = Instance.new("Weld",part)

local Torso = game.Players.LocalPlayer.Character:FindFirstChild("Torso")

part.Size = Vector3.new(1.001,1.001,1.001)
part.BrickColor = BrickColor.new("Lily white")
part.Material = "SmoothPlastic"
part.CFrame = Torso.CFrame 
part.CanCollide = false

Weld.Part0 = part
Weld.Part1 = Torso
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.