HRP rotating with the rotation of the weld, tried to chance the C0 but idk how that works. can anyone please help me (the weld is attached to the hrp)
local auras = workspace.AURAS:GetChildren()
local rolledAura = TABLE[7]
local auraName = “S.T.E.L.L.A.R”
local hrp = player.Character:WaitForChild(“HumanoidRootPart”)
local auraSel = game.Workspace.AURAS:FindFirstChild(auraName):Clone()
print(auraSel)
auraSel.Parent = hrp
auraSel:SetPrimaryPartCFrame(hrp.CFrame)
local weld = Instance.new(“Weld”)
–weld.C0.Rotation = CFrame.lookAt(0, 0, 0)
weld.Part0 = hrp
weld.Part1 = auraSel.PrimaryPart
weld.Parent = auraSel.PrimaryPart
for i, v in auraSel:GetChildren() do
if v:IsA(“BasePart”) then
v.Anchored = false
end
end
ty for helping!
If you’re attempting to weld an aura to the HumanoidRootPart of a player’s character and have it rotate along with the character’s movement, you’ll need to set up the weld’s C0 (CFrame offset) to align with the rotation of the weld.
local auras = workspace.AURAS:GetChildren()
local rolledAura = TABLE[7]
local auraName = "S.T.E.L.L.A.R"
local player = game.Players.LocalPlayer -- Assuming you want to attach it to the local player
local hrp = player.Character:WaitForChild("HumanoidRootPart")
local auraSel = game.Workspace.AURAS:FindFirstChild(auraName):Clone()
auraSel.Parent = hrp
auraSel:SetPrimaryPartCFrame(hrp.CFrame)
local weld = Instance.new("Weld")
weld.Part0 = hrp
weld.Part1 = auraSel.PrimaryPart
weld.Parent = auraSel.PrimaryPart
-- Calculate the relative CFrame between hrp and auraSel
local relativeCFrame = hrp.CFrame:ToObjectSpace(auraSel.CFrame)
-- Set the relative CFrame as the rotation for the weld's C0
weld.C0 = relativeCFrame
-- Unanchor all parts inside auraSel
for i, v in ipairs(auraSel:GetChildren()) do
if v:IsA("BasePart") then
v.Anchored = false
end
end
sorry for replying so late i have some important test coming up il try if it it works!