I tried editing my script to make it fix, but it doesn't. The script works fine for the first part, but when you click the button after resetting, it pops up 21:04:40.265 - 1 is not a valid member of Frame 21:04:40.265 - Script 'Players.Player1.PlayerScripts.LocalScript', Line 16 21:04:40.266 - Stack End
LAYOUT: https://gyazo.com/97a9cabeb159037bd87f43ef6bf82508
Here is the full script :
repeat wait() until game.Players.LocalPlayer:FindFirstChild("ToolN10")
local player = game.Players.LocalPlayer
local gui = player.PlayerGui.Stats.Frame.Inv
for i=1,10 do
wait(0.01)
if player["ToolN"..i].Value == "None" then
gui[i]["Click"].Disabled = true
else
gui[i].TextButton.Text = player["ToolN"..i].Value
gui[i]["Click"].Disabled = false
end
end
player.ToolN1.Changed:connect(function(Change)
if player.ToolN1.Value == "None" then
gui["1"]["Click"].Disabled = true
else
gui["1"].TextButton.Text = player.ToolN1.Value
gui["1"]["Click"].Disabled = false
end
end)
player.ToolN2.Changed:connect(function(Change)
if player.ToolN2.Value == "None" then
gui["2"]["Click"].Disabled = true
else
gui["2"].TextButton.Text = player.ToolN2.Value
gui["2"]["Click"].Disabled = false
end
end)
player.ToolN3.Changed:connect(function(Change)
if player.ToolN3.Value == "None" then
gui["3"]["Click"].Disabled = true
else
gui["3"].TextButton.Text = player.ToolN3.Value
gui["3"]["Click"].Disabled = false
end
end)
player.ToolN4.Changed:connect(function(Change)
if player.ToolN4.Value == "None" then
gui["4"]["Click"].Disabled = true
else
gui["4"].TextButton.Text = player.ToolN4.Value
gui["4"]["Click"].Disabled = false
end
end)
player.ToolN5.Changed:connect(function(Change)
if player.ToolN5.Value == "None" then
gui["5"]["Click"].Disabled = true
else
gui["5"].TextButton.Text = player.ToolN5.Value
gui["5"]["Click"].Disabled = false
end
end)
player.ToolN6.Changed:connect(function(Change)
if player.ToolN6.Value == "None" then
gui["6"]["Click"].Disabled = true
else
gui["6"].TextButton.Text = player.ToolN6.Value
gui["6"]["Click"].Disabled = false
end
end)
player.ToolN7.Changed:connect(function(Change)
if player.ToolN7.Value == "None" then
gui["7"]["Click"].Disabled = true
else
gui["7"].TextButton.Text = player.ToolN7.Value
gui["7"]["Click"].Disabled = false
end
end)
player.ToolN8.Changed:connect(function(Change)
if player.ToolN8.Value == "None" then
gui["8"]["Click"].Disabled = true
else
gui["8"].TextButton.Text = player.ToolN8.Value
gui["8"]["Click"].Disabled = false
end
end)
player.ToolN9.Changed:connect(function(Change)
if player.ToolN9.Value == "None" then
gui["9"]["Click"].Disabled = true
else
gui["9"].TextButton.Text = player.ToolN9.Value
gui["9"]["Click"].Disabled = false
end
end)
player.ToolN10.Changed:connect(function(Change)
if player.ToolN10.Value == "None" then
gui["10"]["Click"].Disabled = true
else
gui["10"].TextButton.Text = player.ToolN10.Value
gui["10"]["Click"].Disabled = false
end
end)
Character Added Script:
game.Players.LocalPlayer.CharacterAdded:connect(function(Add)
local player = game.Players.LocalPlayer
local gui = player.PlayerGui.Stats.Frame.Inv
repeat wait() until game.Players.LocalPlayer.PlayerGui.Stats.Frame.Inv:FindFirstChild("10")
for i=1,10 do
if player["ToolN"..i].Value == "None" then
gui[i]["Click"].Disabled = true
else
gui[i].TextButton.Text = player["ToolN"..i].Value
gui[i]["Click"].Disabled = false
end
end
end)

6 comments
What else would you like so you can see all of the context?
There are no errors anymore with the :WaitForChild, but now the text isn't getting changed.
It is waiting for a value that is existent.
I would like to know if ToolN3.Value is the Value of a Value named ToolN3 or is just the directory leading to a Value. If Value is the name of the Value, say Value.Value for the directory, as you're only indexing the name and not the Value property of the Value.
ToolN3 is a StringValue
I'm going to have to go further into this by checking each object involved in the script, which will probably take forever. (Time I don't have.) .. Sorry, I tried my best. Try some solutions in your head, maybe one of them will solve your issue :)