-
What do you want to achieve?
I want to have it so the part (in this case armor) spawns at the bottom of a HumanoidRootPart
-
What is the issue?
It spawns in the middle of the HumanoidRootPart

-
What solutions have you tried so far?
I’ve tried using CFrame.New but it doesnt work for some reason.
This is what I want it to look like:

Here is the script I made:
local Tutu = game:GetService("ReplicatedStorage"):WaitForChild("Tutu")
script.Parent.Touched:Connect(function(h)
if h.Parent:FindFirstChild("Humanoid") then
local ClonedTutu = Tutu:Clone()
ClonedTutu.Parent = h.Parent
ClonedTutu.CFrame = h.Parent.HumanoidRootPart.CFrame
local Weld = Instance.new("Weld")
Weld.Parent = ClonedTutu
Weld.Part0 = ClonedTutu
Weld.Part1 = h.Parent.HumanoidRootPart
end
end)
1 Like
Try to change CFrame of the armor of clothing so it is lower on the Y axis so
Clone.CFrame = HumanoidRootPart.CFrame + Vector3.new(0, -1, 0)
Weird, I dont know why but that wont work (I would assume it would but it just stays in the same place).
Try use a weld constraint then it should work.
bigobook
(ScriptLocalize)
5
try offsetting the weld maybe
local Tutu = game:GetService("ReplicatedStorage"):WaitForChild("Tutu")
script.Parent.Touched:Connect(function(h)
if h.Parent:FindFirstChild("Humanoid") then
local hrp = h.Parent:FindFirstChild("HumanoidRootPart")
local ClonedTutu = Tutu:Clone()
ClonedTutu.Parent = h.Parent
ClonedTutu.CFrame = hrp.CFrame
local Weld = Instance.new("Weld")
Weld.Parent = ClonedTutu
Weld.Part0 = ClonedTutu
Weld.Part1 = hrp
Weld.C0 = ClonedTutu.CFrame:Inverse() * hrp.CFrame * CFrame.new(0, 1, 0) -- this is the offset
end
end)
2 Likes
Oh! I didnt even think of that, ill go try it out rn
It worked! thank you so much for the help!
1 Like