Line 11 is the problem:
local input = tonumber(frame:WaitForChild("Input").Text)
If the length of the original string, Input.Text, is 0, then you'll get a blank return value.
Simple debug:
if #frame:WaitForChild("Input").Text > 0 and tonumber(frame:WaitForChild("Input").Text) then
To check if the ID is valid and can be loaded, you can view this question's answer.
Once that has passed, check to see if the sound has successfully loaded using IsLoaded...
if sound.IsLoaded then
...and if the condition evaluates to true, play the sound:
sound:Play()
1 comment
I can’t help you. But I’ll tell you what Remote Event is. It doesn’t work.