Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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

✓ Accepted answer

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)


This discussion is preserved as it was. New answers, comments, and votes are closed.