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

TextButton doesn't work in a sound player I made. How could this be fixed?

Asked by 5 years ago

So basically, this sound player makes itself with a script. When it's done, it makes a textbox that you can put the sound asset id into, and an "Enter" button that will copy it into an audio object then it should play. The problem is that the button doesn't work. From videos I've seen, it seems to work just fine and gets me confused.

Thanks in advance. :)

01MusicGUI = Instance.new("ScreenGui", game.StarterGui)
02MainFrame = Instance.new("Frame", MusicGUI)
03SoundIdBox = Instance.new("TextBox", MainFrame)
04TitleLabel = Instance.new("TextLabel", MainFrame)
05EnterButton = Instance.new("TextButton", MainFrame)
06 
07MusicGUI.Enabled = true
08MusicGUI.Name = "MusicGUI"
09 
10MainFrame.Visible = true
11MainFrame.Name = "MainFrame"
12MainFrame.Position = UDim2.new(0.7,0,0.23,0)
13MainFrame.Size = UDim2.new(0,290,0,275)
14MainFrame.Active = true
15MainFrame.BackgroundTransparency = 0.65
View all 64 lines...

:)

1 answer

Log in to vote
0
Answered by 5 years ago

Follow this steps to make it work perfectly:

  1. Create a screenGui inside of the StarterGui folder
  2. Create a local script inside of that GUI
  3. Put this improved code of that one inside of that local script:
01MusicGUI = script.Parent
02MainFrame = Instance.new("Frame", MusicGUI)
03local SoundIdBox = Instance.new("TextBox", MainFrame)
04TitleLabel = Instance.new("TextLabel", MainFrame)
05EnterButton = Instance.new("TextButton", MainFrame)
06 
07MusicGUI.Enabled = true
08MusicGUI.Name = "MusicGUI"
09 
10MainFrame.Visible = true
11MainFrame.Name = "MainFrame"
12MainFrame.Position = UDim2.new(0.7,0,0.23,0)
13MainFrame.Size = UDim2.new(0,290,0,275)
14MainFrame.Active = true
15MainFrame.BackgroundTransparency = 0.65
View all 77 lines...

There you go :D

0
thanks :) SilverCreeper58 23 — 5y
Ad

Answer this question