Trying to copy image-gui

Hello, I’m currently learning new stuff, and since I need them for a project with friends I’m trying to learn things based on a task. What I’m currently trying is to avoid spam and just use for loops to create image itemholder grid-like inventory.
I tried researching the Clone() function, but I couldn’t find out what are the brackets for, so I assumed they will be useful like this:


(check output)

Unfortunately that’s not how you do it (I also used Vector2 instead of UDim2 before seeing syntax error because im new to this). Since I have a really strong understanding of all basics (functions, variables…), feel free to explain what happens in an advanced way. Will be thankful to recieve reasons instead of fixed code!

Here is what the gui looks like just for reference:

The parentheses are there so you can call the function, it doesn’t take any parameters. See the documentation:

image

So you might want something like

imageCloned = image:Clone()

on line 9 instead.

2 Likes