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

I want to make a speaker, this part is in a group, which is in a folder, how do I do this?

Asked by
Potaaden -18
4 years ago
local Speaker_Styles = game.Workspace:WaitForChild("Speaker Styles")

game.Workspace["Speaker Style 1"].Part.Sound:Play()
game.Workspace["Speaker Style 1"].Part.Sound.MaxDistance = 50

1 answer

Log in to vote
0
Answered by 4 years ago
local Speaker_Styles = game.Workspace:WaitForChild("Speaker Styles")

Speaker_Styles["Speaker Style 1"].Part.Sound:Play()
Speaker_Styles["Speaker Style 1"].Part.Sound.MaxDistance = 50

You already defined a variable so no need to use game.Workspace over and over. Also, specify what Speaker_Styles. Is it a folder? Does it contain Speaker Style 1?

Ad

Answer this question