Log in to vote
0

# attempt to index nil with 'ID' error fix?

Asked by 17 days ago
Edited 17 days ago

I am doing a simulator and sometimes, when I open a egg, it gives me that error and you can't do anything even if you rejoin. Any ideas? Script:

function CreateItem(Object, Position, Equipped, Container) local NewItem = ItemTemplate:Clone()

NewItem.Name = Object
NewItem.i.Value = Position
NewItem.ImageButton.Image = Information[Container.Name][Object].ID

if Object == Equipped then
NewItem.Equipped.Visible = true
end

NewItem.ImageButton.MouseButton1Click:Connect(function()
Inspecting = NewItem
ItemInfo.Title.Text = string.upper(Object)
print(NewItem.Name)
if NewItem.Equipped.Visible then
ItemInfo["Equip"].Text = "EQUIPPED" else
ItemInfo["Equip"].Text = "EQUIP"
end

0
Could you update the post with a picture of your explorer please? KingDomas 148 — 17d
0
Can you tell us the errror please? BeautifulAuraLover 371 — 17d
0
The error is: Players.MyName.PlayerGui.MainUI.LocalScript:03: attempt to index nil with 'ID'. Also, what do you mean a picture of my explorer? SavageBeibi 0 — 17d