Hello! I wanted to make a textbox in which the player types an audio ID and when they press enter, the remote event fires and the SoundId in the boombox changes to the ID the player typed in the textbox.
Here is the LocalScript inside the textbox:
local box = script.Parent
box.FocusLost:Connect(function(enterpressed)
if enterpressed then
game.ReplicatedStorage.Music.CustomID:FireServer()
end
end)
And here’s the server script inside ServerScriptService:
local remote = game.ReplicatedStorage.Music.CustomID
local SoundObject = game.Workspace.Boombox.Sound
remote.OnServerEvent:Connect(function(plr)
SoundObject.SoundId = "rbxassetid://"..plr.PlayerGui.MusicPlayer.ImageLabel.TextBox.Text
end)
I tested it multiple times, the event fired and the SoundId changed to just “rbxassetid://” without the text the player typed in. The “ClearTextOnFocus” property in the textbox is also disabled. Any help is appreciated