The problem was solved thanks for helping em guys
I’d suggest you use welds, but make sure the flag’s parts’ CanCollide property is set to false, and their Massless properties to true.
That’s probably what’s causing the issue here.
oh ok but now theres a new problem the flag isnt facing upwords its like sideways
btw this is my script
bp:SetPrimaryPartCFrame(Character.HumanoidRootPart.CFrame)
for i,v in pairs(bp:GetChildren()) do
if v:IsA(“BasePart”) then
local w = Instance.new(“Weld”, v)
w.C0 = (v.CFrame:inverse() * Character.HumanoidRootPart.CFrame)
w.Part0 = v
w.Part1 = Character.HumanoidRootPart
v.Anchored = false
v.CanCollide = false
v.Massless = true
end
end
Just rotate the weld’s C0/C1 by the necessary amount of rotation, like so:
w.C0 = w.C0 * CFrame.Angles(math.rad(90), 0, 0) --//Tinker with this until you get the right axis.
oh ok so the x axis right? or is the y axis
I can’t entirely remember, but one of those three axis’ should give you the correct orientation. The flag definitely needs 90 degrees of rotation to upright it though.
You have got the properties mixed up as it seems. The Part1
is welded to the Part0
, but you have it where the Part0
is welded to the part1. This should fix it:
bp:SetPrimaryPartCFrame(Character.HumanoidRootPart.CFrame)
for i,v in pairs(bp:GetChildren()) do
if v:IsA(“BasePart”) then
local w = Instance.new("Weld")
w.C0 = (Character.HumanoidRootPart:inverse() * v.CFrame)
w.Part0 = Character.HumanoidRootPart
w.Part1 = v
w.Parent = w
v.Anchored = false
v.CanCollide = false
v.Massless = true
end
end
Also, I recommend that you refrain from using the 2nd parameter of Instance.new, as it can cause performance issues - there is a PSA about it if you’re concerned. You should initialise the instance’s properties, then parent it after
so is bp equal to the torso instead
but doesnt the torso have no children
OH NEVERMIND I see what your doinggg