Creating Sounds In Character

I’m trying to add a sound to every characters humanoid root part when they join the game. The problem is that it wont create the sound inside the humanoidrootpart. I tried cloning pre existing sounds in the humanoidrootpart but that do sent work. If you have a solution please tell me. Thank You.

game.Players.PlayerAdded:Connect(function(plr)
	game.CharacterAdded:Connect(function(character)
		local head = character:WaitForChild("HumanoidRootPart")
		local sound = Instance.new("Sound")
		sound.Name = "talking"
		sound.SoundId = "rbxassetid://6467449877"
		sound.Volume = 0.5
		sound.Parent = head
	end)
end)

Thats not a normal head…


Try setting the Parent to the PrimaryPart if that works:

sound.Parent = character.PrimaryPart

That Doesn’t seem to work, I think the solution may be using the sound service but I don’t know what to do with it.

I think I found the issue, lol
Its supposed to be this:

game.Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(character)

That doesn’t seem to work either, I am really confused because I though this would be simple.

Well it should work, i just tested it in my studio. It Create sound. Though I used @Cairo variant
image

RobloxStudioBeta_5ksqOYXeO9

Are you using client or server script?

I tried both and they don’t work, what are you using?

Server one. (30 lettersssssssssss). Btw it will work ONLY in server script, in local script it just won’t create anything

Can you send me your entire script, I might be missing something.

game.Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(character)
		local head = character:WaitForChild("HumanoidRootPart")
		local sound = Instance.new("Sound")
		sound.Name = "talking"
		sound.SoundId = "rbxassetid://6467449877"
		sound.Volume = 0.5
		sound.Parent = head
	end)
end)

that still doesn’t work. I have no idea why.

Well, can you send some screenshots/or video what happens when you launch game. Also check output for errors

Can you add me to friends in roblox and give team create, so i can check what’s wrong? My Nick PhantomGame_Youtube

The user name in moneyguy008. My dev fourm account is an alt

Oh wait, i just realised. You CAN’T Run server scripts from StarterCharacterScripts. Do that in ServerScriptService

… i wana cry rn bro LOL. i spent way to long

Well, when you get troubles with simple errors it always annoying, good luck!