Problem with accessory Gui

Hey there! I am currently making a system where if you have passed a certain Stage on my DCO, you will get access to a Halo. The script I made was just to test with it and will still get expanded, but I already ran into a problem. See, the script(below) works fine. But the Halo won’t get attached to the player and will just kind of float under it, like 5000 studs under the Player itself. Does anyone know why? And if so, how do i fix this?

script:

script.Parent.MouseButton1Click:Connect(function()
	local plr = game.Players.LocalPlayer
	local Halo = game.ReplicatedStorage:FindFirstChild("Hats").WhiteHalo
	local Stage = game.Players.LocalPlayer.leaderstats.Stage.Value
	
	if plr.leaderstats.Stage.Value >= 50 then
		local NewHalo = Halo:Clone()
		plr.Character.Humanoid:AddAccessory(NewHalo)
	end
end)
1 Like

You sure set the halo’s handle’s position to be right above the player.

script.Parent.MouseButton1Click:Connect(function()
	local plr = game.Players.LocalPlayer
	local Halo = game.ReplicatedStorage:FindFirstChild("Hats").WhiteHalo
	local Stage = game.Players.LocalPlayer.leaderstats.Stage.Value
	
	if plr.leaderstats.Stage.Value >= 50 then
		local NewHalo = Halo:Clone()
        NewHalo.Handle.Position = plr.Character.HumanoidRootPart.Position + Vector3.new(0, 5, 0)
		plr.Character.Humanoid:AddAccessory(NewHalo)
	end
end)

Ok so, now it works. But it doesnt stay attached. Its locked in position now. it might be because i have it anchored, but if i don’t have it anchored it just spawns all the way at the bottom again.

Sorry for not responding, I had to go for a little bit. Maybe try welding it to their character, then unanchored it once it is attached.