I've never done anything like this before and don't really know where to start. For instance, if I wanted a player to have a brick attached to their torso when they click a part, how would I do this? I plan on doing something similar to this (using parts that are uncancollided and weightless, as I simply need the visual aspect). Thanks so much in advance.
There are many ways you can weld a part to a player, here are some:
Instance Weld used for holding two parts together in a fixed position relative to each other. EXAMPLE:
local partA = workspace:WaitForChild("PartA") local partB = workspace:WaitForChild("PartB") local weld = Instance.new("Weld") -- create new Weld -- Remember that where the weld is does not really matter -- but its good to tidy up everything. weld.Part0 = partA weld.Part1 = partB --[[ those settings will hold tight 2 parts together but if the size are equal, you will probably want a offset between each right? C0 is the offset relative to Part0 (partA) and C1 Part1 example: --]] weld.C0 = CFrame.new(0, 2, 0) -- 2 studs up weld.C1 = CFrame.new(0,-2,0) -- 2 studs down weld.Parent = partA
Now you should have something like this. And that's the basic concept of Weld, sure you can do different offsets, but now, moving to WeldConstraint Weld constraints are used for welding two parts on their last known position, example
local partA = workspace:WaitForChild("PartA") local partB = workspace:WaitForChild("PartB") local weld = Instance.new("WeldConstraint") weld.Part0 = partA weld.Part1 = partB weld.Enabled = true weld.Parent = partA
And thats the base concept for WeldConstraint, if you are going to use them for a suit for example, you would need to move the part to be welded away from another part and weld as quick as possible for preventing misplacements like 4,000052, I recommend using it only when building something.
Those are only some of the weld types in Roblox, you can find more about them in developer wiki, and thats it really. Hope this helps, good luck on your projects!