i'm making a game similar to miner's haven but i'm already struggeling with the inventory.
i can only select the first item in the inventory and no other item. the problem is propably with the way WaitForChild works but i'm lost on how to fix it. i have tried all the options i know but i don't know a lot since i'm still a beginner.
the code:
function MouseEnter()
print(ScrollingFrame:WaitForChild("Item").NameValue.Value)
InventoryFrame.Frame.NameText.Visible = true
InventoryFrame.Frame.NameText.Text = ScrollingFrame:WaitForChild("Item"):WaitForChild("NameValue").Value
print(ScrollingFrame:WaitForChild("Item").NameValue.Value)
end
function MouseLeave()
InventoryFrame.Frame.NameText.Visible = false
InventoryFrame.Frame.NameText.Text = ("no")
end
ScrollingFrame:WaitForChild("Item").MouseEnter:connect(MouseEnter)
ScrollingFrame:WaitForChild("Item").MouseLeave:connect(MouseLeave)
i'm sorry if i can't explain my problem very well since this is the first time i use this site.

2 comments
Did you open the output tab? I want to see the errors.
with the code listed up above there are no errors