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

Attempt to index nil with text?

Asked by 4 years ago
Edited 4 years ago

this is my code but i don't know where this error is coming from

local player = game.Players.LocalPlayer
local ItemGui = script.Parent.Item
local ObjectName = ItemGui:FindFirstChild("ObjectName")

player.Inventory.ChildAdded:Connect(function(child)
    ItemGui:Clone()
    ObjectName.Text = child.Name
    ItemGui.Visible = true
end)

Players.FireDreamGames.PlayerGui.Inventory.InventoryFrame.MainFrame.Items.LocalScript:7: attempt to index nil with 'Text'

0
does child have a value? jgftr7 74 — 4y
0
i don't understand? FireDreamGames 17 — 4y

Answer this question