0

# A frame is not a valid member of another frame?

This question has been solved by the original poster.

Okay, so I have a script that makes a GUI change another GUI's text when clicked on. Here is the script:

local Weights = game.ReplicatedStorage:WaitForChild('Weights')
local Weight = Weights:WaitForChild('Weight25')

local ItemsFolder = game.ReplicatedStorage:WaitForChild('Weights')

for i,Item in pairs(ItemsFolder:GetChildren())do

local name = Item.Name
local price = Item.ShopGuiInfo.Price.Value
local desc = Item.ShopGuiInfo.Description.Value

ItemName.Text = 'Test Text'
print(ItemName.Text)

end

end)


Here is my issue. At the line where it says:

I am given an error that says:

WeightsFrame is not a valid member of Frame.Players.TheGamerGuy82.PlayerGui.Main.WeightsFrame.WeightsMenu

This script's parents, from top to bottom: Main, WeightsFrame, WeightsMenu, ScrollingFrame, WeightsButton25.