while true do
	wait(3)
	for i, Player in pairs(game.Players:GetPlayers()) do
		local clone = script.Parent.Parent.plrname:Clone()
		clone.Text = Player.Name..":"..Player.leaderstats.ELevel.Value
		clone.Parent = script.Parent
	end
	game.ReplicatedStorage.kill:Clone().Parent = script.Parent.Parent.Parent
	script.Parent.Parent:Destroy()
end

This script is supposed to clone a textbutton with a name and evoluton level for each player, but it doesn't clone properly. It says the error is on line 4, but I don't see a problem with it. (the problem is with the cloning, everything lines up correctly.) If you know what the problem is, please say something. Thanks.

4 comments

0

(also, it's in a loop to refresh it every 3 seconds.)

0

please provide the error

0

The error says attempt to index nil with 'Parent'

0

Then its likely because you are navigating the heirarchy relitive to the script which isnt a good idea in the long run. Instead find the thing you want to clone from game.Player...