Script don't want clone items

Hello everyone, I have a DataStore script in which the cloning function is performed, but for some reason it does not work.

local RepSt = game:GetService("ReplicatedStorage")
... -- skip part script
			AmongusPLUSHIE.Value = tableOfData["AmongusPLUSHIE"]
			Plate.Value = tableOfData["Plate"]
			BrickOfSound.Value = tableOfData["BrickOfSound"]

		end
	else 

		AmongusPLUSHIE.Value = false		
		Plate.Value = false
		BrickOfSound.Value = false
	end
	
	
	
	if AmongusPLUSHIE.Value == true then
		RepSt.Items.AmongusPLUSHIE:Clone()
		wait(20)
		RepSt.Items.AmongusPLUSHIE.Parent = player.Backpack
		end
	if Plate.Value == true then
		RepSt.Items.Plate:Clone()
		RepSt.Items.Plate.Parent = player.Backpack
		end
	if BrickOfSound.Value == true then
		RepSt.Items.BrickOfSound:Clone()
		RepSt.Items.BrickOfSound.Parent = player.Backpack
				   
	end
	
end)

There are no errors and the assignment function

RepSt.Items.BrickOfSound.Parent = player.Backpack

(like others) works

You didn’t define your clone variable, and instead are using the actual source of the clone.
Here’s your fix:

if AmongusPLUSHIE.Value then
	local thing = RepSt.Items.AmongusPLUSHIE:Clone()
	wait(20)
	thing.Parent = player.Backpack
	end
if Plate.Value then
	local thing = RepSt.Items.Plate:Clone()
	thing.Parent = player.Backpack
	end
if BrickOfSound.Value then
	local thing = RepSt.Items.BrickOfSound:Clone()
	thing.Parent = player.Backpack		   
end
2 Likes