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

How to change the audio ID in workspace with starter GUI?

Asked by 5 years ago
Edited 5 years ago

Title is always confusing. I've been wondering how I can change audio ID's in workspace while using a GUI ingame. I tried to make one, but I'm confused on how to make it.

Error: Sound is not a valid member of ScreenGui

script.Parent.MouseButton1Click:connect(function()
    local textbuttoninput = script.Parent.Parent.TextBox.Text
    local sound = script.Parent.Parent.Parent.Sound
    sound.SoundId = 'rbxassetid://'..textbuttoninput
    sound:play()
end)

1 answer

Log in to vote
0
Answered by 5 years ago

try using using textbox and values like

game.Workspace.Sound.Soundid = directory.Value

Ad

Answer this question