hi, i’m struggling at welding lately, hopefully somebody knows how to help
-
What do you want to achieve? I want to attach a model to a player’s back
-
What is the issue? I don’t know how to do it, i tried using instance.new and a weld to attach the model primary part to the humanoidrootpart, but even if they are welded to the primary part, the other children of the model won’t follow the primary part and will stay distant from the rest
-
What solutions have you tried so far? i tried to look for solutions on the devforum, but i couldn’t find anything that really helps
i’ll leave you here my code, which is a localscript placed in StarterCharacterScripts. another thing that you should know is that ‘Detector’ is a model, and inside of it there are ‘position’, which is the primary part, and inside of it there are ‘button’ and ‘handle’, that are already welded to position but won’t follow it
local plr = script.Parent
local detector = game.ReplicatedStorage:WaitForChild("Detector")
local Hrp = plr:FindFirstChild("HumanoidRootPart")
local clone = detector:Clone()
clone.Parent = plr
local button = clone.position.Button
local weld = Instance.new("WeldConstraint")
weld.Parent = clone.PrimaryPart
weld.Part0 = clone.PrimaryPart
weld.Part1 = Hrp
clone.PrimaryPart.Position = Hrp.Position
clone.PrimaryPart.Orientation = Hrp.Orientation
Please be clear when explain something, i’m kinda new at scripting so i don’t know that much