Not a valid member of DataModel "Plugin Creating"

For some reason when I click the button it gives me this error:
image

Heres the script:

script.Parent.MouseButton1Click:Connect(function()
	local killbrick = script.Parent.Parent.Parent.Parent.Parent.ScriptModels.Killbrick
	killbrick:Clone()
	killbrick.Parent = workspace
	killbrick.Anchored = true

end)


Can you please send us a picture of the explorer

Maybe try removing one of the .Parent things

Why did you use .parent 5 times?

image
here u go

because its outside the folder

i tried using game.StarterGui.AdvancedScripts.ScriptModels.Killbrick but same error

Try replacing

local killbrick = script.Parent.Parent.Parent.Parent.Parent.ScriptModels.Killbrick

with

local killbrick = game.Workspace.Killbrick

but the killbrick is in the folder?

Did you try it? ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ

it wont make sense since im cloning the brick and its not even in workspace but ill try it.

sorry my old picture was wrong
heres where it is:

You failed to ever mention that your model was in StarterGui…

Do local killbrick = game.StarterGui.Killbrick

I made it spawn in by making the script in the button but instead of cloning it its moving it?

local killbrickGui = script.Parent
local killbrick = game.StarterGui.AdvancedScripts.Killbrick
killbrickGui.MouseButton1Click:Connect(function()
	print("Clicked")
	killbrick.Parent = game.Workspace
	killbrick:Clone()
	killbrick.Anchored = true
	print("Spawned")
end)
local killbrickGui = script.Parent
local killbrick = game.StarterGui.AdvancedScripts.Killbrick
killbrickGui.MouseButton1Click:Connect(function()
	print("Clicked")
	local KillBrick = killbrick:Clone()
    KillBrick.Parent = game.Workspace
	KillBrick.Anchored = true
	print("Spawned")
end)