Attempt to index function with 'Clone' error

My goal is to make a file system where the user could create files/documents.
It was all going fine until I ran into an error.

Here’s the error:

attempt to index function with ‘Clone’

I tried looking on google, looked all over the developer forum.

Here is the code:

	local NewFile ="ImageButton",script.Parent.Parent.Main.DesktopIcons)
	NewFile.Image = icon
	NewFile.Position = spot
	NewFile.Size =,50,0,50)
	NewFile.BackgroundTransparency = 1
	NewFile.Name = "File"
	local clone = game.ReplicatedStorage.Remove:Clone() --error line, Remove = script
	clone.Parent = NewFile
	clone.Disabled = false

Any help would be appreciated! Thanks!

print remove’s class name because if it’s a function then you cant clone it

screen shot me your game explorer with the replicated storage stuff

1 Like

Members have precedence over children so when you are doing

you are actually referring to the deprecated Instance:Remove method. So just change the name of the thing you wanna clone to something like Delete or similar.

1 Like

I don’t know how to post screenshots could you tell me?

click the download button to post a screenshot inside when you reply

does that make a download though?

no it opens up your files so you can post anything

Ahh get you… (30 characters)