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

Textbox text error with radio script?

Asked by 7 years ago

This is the error for my radio

****18:10:57.458 - Sound Workspace.Odawg566.UpperTorso.Sound Failed to load ****rbxassetid://Enter ID Here

The textbox's starting text is Enter ID Here, but when I add a music Id it wont change to the new id, instead it picks up the textbox's old text "Enter ID Here".

It's been bothering me for a while, some help would be nice.

01local PlayButton = script.Parent:WaitForChild("Play")
02local StopButton = script.Parent:WaitForChild("Stop")
03local ID = script.Parent:WaitForChild("Id")
04local event = script.Parent:WaitForChild("PlayMusic")
05local event1 = script.Parent:WaitForChild("StopMusic")
06 
07wait(1)
08event.OnServerEvent:connect(function(plr)
09   if plr.Character.UpperTorso:FindFirstChild("Sound") then
10        print("Has Sound")
11    else
12        local effect = script:WaitForChild("Beats"):Clone()
13        effect.Parent = plr.Character.UpperTorso
14     local sound = Instance.new("Sound", plr.Character.UpperTorso)
15     print("Giving Sound")
View all 34 lines...

1 answer

Log in to vote
-1
Answered by 7 years ago

You should try messing around with the textbox, because there could be a lot of reason, you can add wait()

0
I tried to add a wait but even with a wait it wont load the new text. Odawg566 9 — 7y
0
Maybe you should try adding another StringValue and set that value to the text in the TextBox, and then add that value to the SoundId, That's how you do it indirectly and I believe it should work, this happened to me once Konethorix 197 — 7y
Ad

Answer this question