Attempt to index nil with 'Texture'

Hi! I have been attempting to fix my issue via my script that is causing it not to work, which is…

Error in script:

image

All suggestions will be tried.

What is icon.Texture defined as? A string?

1 Like

It is defined as…

icon = game.ReplicatedStorage.SamsIcons.Purple

I was using os.date for my administration panel to detect dates, and each date the new icon of my panel is changed;

Is Purple a ImageLabel or something?

2 Likes

Decal, here;

image

I would’ve used ImageLabels although I would’ve thought decals would function better.

if it says “Attempt to index nil with something” then the thing like icon in this case, the game thinks is nil

2 Likes

How would I fix that, would I either use :WaitForChild or, :FindFirstChild?

Actually, it would be helpful if we saw the entire code :thinking:

1 Like

I would provide the full code although, I would have to change 50% of it as I do not want my assets being taken.

Could provide you it via messages though.