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

My script is saying something that is incorrect, can anyone help me?(Answered.)

Asked by 10 years ago

ERROR MESSAGE -11:37:59.873 - AddID is not a valid member of ScreenGui 11:37:59.875 - Script 'Players.Player.PlayerGui.MusicLibrary.Menu.HistoryFrame.Add', Line 2 The script is this, but before I show it, there is a screengui that contains a value called AddID. It is 5 parents away from the script. There is also a Library frame which is 4 parents away from the script. This is the script:

script.Parent.MouseButton1Click:connect(function()
script.Parent.Parent.Parent.Parent.Parent.AddID.NameValue.Value = script.Parent.Parent.Text
script.Parent.Parent.Parent.Parent.LibraryFrame.Visible = true
script.Parent.Parent.Parent = false
script.Parent.Parent.Visible = false    
end)

1 answer

Log in to vote
0
Answered by
iLegitus 130
10 years ago

Try~~~~~~~~~~~~~~~~~


script.Parent.MouseButton1Click:connect(function) script.Parent.Parent.Parent.Parent.Parent.AddID.NameValue.Value = script.Parent.Parent.Text script.Parent.Parent.Parent.Parent.LibraryFrame.Visible = true script.Parent.Parent.Parent = false script.Parent.Parent.Visible = false
end)

if that doesnt work try

function mb() script.Parent.Parent.Parent.Parent.Parent.AddID.NameValue.Value = script.Parent.Parent.Text script.Parent.Parent.Parent.Parent.LibraryFrame.Visible = true script.Parent.Parent.Parent = false script.Parent.Parent.Visible = false

script.Parent.MouseButton1Click:connect(mb)

And if that also doesnt work try :

function mb() script.Parent.Parent.Parent.Parent.Parent.AddID.NameValue.Value = script.Parent.Parent.Text script.Parent.Parent.Parent.Parent.LibraryFrame.Visible = true script.Parent.Parent.Parent = false script.Parent.Parent.Visible = false

script.Parent.MouseClick:connect(mb)

~~~~~~~~~~~~~~~~~

Ad

Answer this question