I need help with this

So Im not sure why this code does not keep cloning folders it only makes one folder

print(“wsp man1”)
local function playerdata(player)

local amazingfolder = Instance.new("Folder")


print("wsp man2")
while wait(1) do 
	amazingfolder:Clone()
	amazingfolder.Parent = player
end

end
print(“wsp man3”)

game.Players.PlayerAdded:Connect(playerdata)

1 Like

Have you tried to create the folder within the loop?
Aka putting amazingfolder within the loop

2 Likes

@Valkyrop is correct. Here’s how the result would look:

print("wsp man1")

local function playerdata(player)
	print("wsp man2")
	while true do 
		wait(1)
		local amazingfolder = Instance.new("Folder")
		amazingfolder.Parent = player
	end
end

print("wsp man3")
game.Players.PlayerAdded:Connect(playerdata)
2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.