Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
2

I have multiple Sounds how to rename Sound in script??

Asked by 2 years ago

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.

0
Sorry for the weird title having issues naming it this [Having issues renaming Sound] theking66hayday 841 — 2y

2 answers

Log in to vote
2
Answered by 2 years ago

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")
0
Thank u I didn't know I could do that theking66hayday 841 — 2y
Ad
Log in to vote
2
Answered by 2 years ago

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).

0
Ello imnotaguest1121 362 — 2y
0
Did it work? LikeableEmmec 470 — 2y
0
Hi again yes you can use sound.name. @Pedrougubtz showed me how. --Thanks I did not know you can put a sound in startercharacterscripts and it would just be in the character. theking66hayday 841 — 2y

Answer this question