Hi, I am having issues renaming sound in this script. I got a script in StarterCharacterScripts. The script puts a sound in the player's head. Issue i'm having is that I want multiple sounds, but I need to rename sound. Script:
local sound = Instance.new("Sound") sound.SoundId = "rbxassetid://9064263922" -- Replace the numbers with your sound's asset ID. sound.Parent = script.Parent:WaitForChild("Head")
What I have tried is replacing sound and renaming it sounda throughout the script. But it doesn't work.
You can use sound.Name to change the name of the sound.
local sound = Instance.new("Sound") sound.Name = "Put the Name Here" sound.SoundId = "rbxassetid://9064263922" -- Replace the numbers with your sound's asset ID. sound.Parent = script.Parent:WaitForChild("Head")
Hello again! But uh.. cant you use sound.Name
? Maybe I'm just stupid. But if that doesn't work and I didn't read correctly, you can insert Sound
's into StarterCharacterScripts (which will not parent it to the Head, but you can use a script to parent it to the Head).