Weld wont rotate correctly (please help me ive spent 3 hours on this)

im trying to weld a part to the player but when i do this the part doesnt rotate at all and i have completely given up and have no clue what to do

 local range = Net.Config.Range.Value
		local height = (character:WaitForChild("HumanoidRootPart").Size.Y / 2) + character.Humanoid.HipHeight 
		local offset = CFrame.new(0,-height,0)
		
		local p = replicatedStorage.VFX:WaitForChild("RangeVFX"):Clone()
		p.Name = "Range"
		p.Material = Enum.Material.ForceField
		p.Transparency = 0.3
		p.Size = Vector3.new(.3,range * 2,range * 2)
		p.Orientation = Vector3.new(0,math.rad(-180),math.rad(90))
		p.CFrame = character:WaitForChild("HumanoidRootPart").CFrame * offset * CFrame.Angles(0,0,math.rad(90))
		p.CanCollide = false
		p.CastShadow = false
		p.Anchored = false

		local weld = Instance.new("Weld")
		weld.Part0 = p
		weld.Part1 = character:WaitForChild("HumanoidRootPart")
		weld.Parent = p
		p.Parent = character

I’m not entirely sure, but I do have a few questions:

  • Have you named a variable local replicatedStorage = game:GetService("ReplicatedStorage")? at the beginning of your script? If not then you haven’t put a capital R at the beginning of it in line 5

  • If your item is already in ReplicatedStorage and you clone it why are you setting all the Properties in this script? You should just put the item RangeVFX there with its Material, Transparency, Anchored and everything else already set.

  • You set the Orientation of p in line 10, then in the next line you change it again.

  • Have you tried parenting the weld first, then changing the Orientation?

yes replicatedStorage is a variable, that and 2 other variables werent show which is player, and character, because i felt it was common sense that they would be known as variable,

i had made something like this before but i didnt have a premade part so i just copied the script over, i can and will change it all outside the script

i was just trying to figure out why it wasnt rotating at all so i tried using both CFrame and the Orientation but it was the exact same result using both or not

yes i have tried this and nothing changes

https://gyazo.com/e8427278929fcc39d52c4e5a829f921d
theres a blue ring around my player and its vertical (from my head to my feet) and i want it at the base of my player ( at my feet) and horizontal (standing in the center of it like its a hula hoop
it works just fine when i use a weld constraint but then my player doesnt rotate at all so that doesnt help

Do you have RangeVFX Massless? Anything you weld (or any tool for that matter) needs to be Massless so it doesn’t interfere with the character’s physics.
If it’s a Union or MeshPart, you could even try modifying it by aligning the X,Y,Z axes so they don’t need to be rotated, they’ll just weld in the correct Orientation.

rotate p around the y axis
CFrame.new(p.Position,p.Position+Vector3.new(0,0,1))