Radio Script not working, string not concatenating

Hello! I wanted to make a radio system but for some reason the string is not concatenating. Thank you!

    local Frame = script.Parent
    local TextBox = Frame.TextBox
    local TextButton = Frame.TextButton
    
    TextButton.MouseButton1Click:Connect(function()
	if TextBox.Text ~= "" or TextBox.Text ~= " " then
        print(1)
        local newInstance = Instance.new("Sound")
        print(2)
        newInstance.SoundId = ("rbxassetid://" .. tostring(TextBox.Text))    
        print(3)
        newInstance:Play()
        print(4)
        print(newInstance.SoundId) --only prints ' "rbxassetid://" '
		end
    end)```
1 Like

I think that you might have to parent the sound object,
Try doing this :

newInstance.SoundId = "rbxassetid://" .. TextBox.Text 

instead of this

newInstance.SoundId = ("rbxassetid://" .. tostring(TextBox.Text)) 
2 Likes

Weird, I copied your code and everything works fine. Are you sure things with the TextBox are fine?

2 Likes

Yes!! I forgot to parent it! Thank you so much! ;-;