Script refuses to parent Replicated Instances to Dynamic Head

My script works perfectly fine in R6 or R15 Charcters but when a person has a Dynamic Head the Replicated Instances do not Parent to the Head.
This makes it so when a player buys anything it can’t find sounds to play and do its effect.

local Players = game:GetService("Players")
local Partystuf = game.ReplicatedStorage["Party Stuff"]
local streamers = Partystuf.Streamers
local Confetti = Partystuf.ConfettiCannon
local Woo = Partystuf.Woo
local Horn = Partystuf.Horn


Players.PlayerAdded:Connect(function(player)
	print("PlayerAdded")
	player.CharacterAdded:Connect(function(Character)
		local CWoo = Woo:Clone()
		local CHorn = Horn:Clone()
		local Confy = Confetti:Clone()
		Confy.Parent = Character:FindFirstChild("Head")
		CWoo.Parent = Character:FindFirstChild("Head")
		CHorn.Parent = Character:FindFirstChild("Head")
		print("Spawned Horn")
		print("Chorn's Parent is:",CHorn.Parent)
		print("Chorn's ParentParent name Is:",CHorn.Parent.Parent.Name)
		print("Chorn's ParentParent ClassName Is:",CHorn.Parent.Parent.ClassName)
	end)
end)

game:GetService("MarketplaceService").PromptPurchaseFinished:Connect(function(purchasedPlayer, purchasedPassID, purchaseSuccess)
	if purchaseSuccess then
		local leaderstats = purchasedPlayer:FindFirstChild("leaderstats")
		local Buys = leaderstats:FindFirstChild("Buys")
		Buys.Value = Buys.Value + 1
		purchasedPlayer.Character.Head.Horn:Play()
		purchasedPlayer.Character.Head.Woo:Play()
		purchasedPlayer.Character.Humanoid.WalkSpeed = 25
		purchasedPlayer.Character.Head.ConfettiCannon.Enabled = true
		local CStrm = streamers
		for i = 1, 25 do
			local BCStrm = CStrm:Clone()
			BCStrm.Parent = workspace
			BCStrm.Position = purchasedPlayer.Character.Head.Position
			BCStrm.AssemblyLinearVelocity = Vector3.new(math.random(-20,20),math.random(10,35),math.random(-20,20))
			BCStrm.AssemblyAngularVelocity = Vector3.new(math.random(-60,60),math.random(-60,60),math.random(-60,60))
			wait(0.3)
		end
		wait(15)
		purchasedPlayer.Character.Head.ConfettiCannon.Enabled = false
		purchasedPlayer.Character.Humanoid.WalkSpeed = 5
		wait(5)
 		purchasedPlayer.Character.Humanoid.WalkSpeed = 16
		wait(5)
	else
		warn(purchasedPlayer.Name, "Didnt buy anything", purchasedPassID)
	end
end)


It can find the Head, and even Parent it to the Head, but when I try to find it in the Explorer it doesn’t exist
I have tried using FindFIrstChild(“Head”) but it gave the same results, im clueless on what to do to fix this

1 Like

I truely feel this shouldn’t be the intended effect if not a bug. I instead opted to using the HumanoidRoot of a character instead, just avoiding that issue of Dynamic Heads

local Players = game:GetService("Players")
local Partystuf = game.ReplicatedStorage["Party Stuff"]
local streamers = Partystuf.Streamers
local Confetti = Partystuf.ConfettiCannon
local Woo = Partystuf.Woo
local Horn = Partystuf.Horn

--Cloning partystuff to HumanoidRoot
Players.PlayerAdded:Connect(function(player)
	print("PlayerAdded")
	player.CharacterAdded:Connect(function(Character)
		local CWoo = Woo:Clone()
		local CHorn = Horn:Clone()
		local Confy = Confetti:Clone()
		CWoo.Parent = Character:FindFirstChild("HumanoidRootPart")
		CHorn.Parent = Character:FindFirstChild("HumanoidRootPart")
		Confy.Parent = Character:FindFirstChild("HumanoidRootPart")
	--	print("Spawned Horn")
	--	print("Chorn's Parent is:",CHorn.Parent)
	--	print("Chorn's ParentParent name Is:",CHorn.Parent.Parent.Name)
	--	print("Chorn's ParentParent ClassName Is:",CHorn.Parent.Parent.ClassName)
	end)
end)

game:GetService("MarketplaceService").PromptPurchaseFinished:Connect(function(purchasedPlayer, purchasedPassID, purchaseSuccess)
	if purchaseSuccess then
		local leaderstats = purchasedPlayer:FindFirstChild("leaderstats")
		local Buys = leaderstats:FindFirstChild("Buys")
		Buys.Value = Buys.Value + 1
		purchasedPlayer.Character.HumanoidRootPart.Horn:Play()
		purchasedPlayer.Character.HumanoidRootPart.Woo:Play()
		purchasedPlayer.Character.Humanoid.WalkSpeed = 25
		purchasedPlayer.Character.HumanoidRootPart.ConfettiCannon.Enabled = true
		local CStrm = streamers
		for i = 1, 25 do
			local BCStrm = CStrm:Clone()
			BCStrm.Parent = workspace
			BCStrm.Position = purchasedPlayer.Character.Head.Position
			BCStrm.AssemblyLinearVelocity = Vector3.new(math.random(-20,20),math.random(10,35),math.random(-20,20))
			BCStrm.AssemblyAngularVelocity = Vector3.new(math.random(-60,60),math.random(-60,60),math.random(-60,60))
			wait(0.3)
		end
		wait(15)
		purchasedPlayer.Character.HumanoidRootPart.ConfettiCannon.Enabled = false
		purchasedPlayer.Character.Humanoid.WalkSpeed = 5
		wait(5)
 		purchasedPlayer.Character.Humanoid.WalkSpeed = 16
	else
		warn(purchasedPlayer.Name, "Didnt buy anything", purchasedPassID)
	end
end)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.