Attempt to index nil with "Parent"

but when i trying to use me.Name it still print character name.

if it actually got clone but when i try to use clonechar.Name it print error?

You printed the name and then destroyed so it’ll print! Code is from start to end u can’t get order wrong!

Sorry for bad grammar I’m not fluent English

did you mean :Clone() is working too slow?

So there are no time enough to clone?

Nope! So look when I was making if you had a gun and chose a new the gun would be destroyed! Meaning it’s impossible to clone because it’s gone! So instead of :Destroy do :ClearAllChildren not hard

Characters, by default, don’t have Archiveable=true. IIRC, Clone doesn’t work with things that aren’t set to Archiveable.
me.Archiveable = true
local clonechar = me:Clone()

2 Likes

Then how do i do to clone character before it got actually remove, i need it to do this from this topic

Give the parent before u destroy the tool!

Why character Archiveable value didn’t true ?

plr.CharacterRemoving:Connect(function(me)
local clonechar = me:Clone()
clonechar.Parent = game.ServerStorage.Backup
if game.ServerStorage.Backup:FindFirstChild(plr.Name) then
game.ServerStorage.Backup:FindFirstChild(plr.Name):ClearAllChildren()
end

end)

I think it is archaic. People used to edit their games as a character rather than in Studio, and if you saved your game wile Archiveable is true, your character would be saved, and that’s bad. So characters default to non-archiveable so characters don’t accidentally get saved.

So is it ok to change it to true before it got deleted?

Try it like this:

game.Players.PlayerAdding:Connect(function(plr)
        plr.CharacterRemoving:Connect(function(me)
		local clonechar = me:Clone()
		
		if game.ServerStorage.Backup:FindFirstChild(plr.Name) then
			game.ServerStorage.Backup:FindFirstChild(plr.Name):Destroy()
		end
		clonechar.Parent = game.ServerStorage.Backup
 	end)

I already try it it print error like nothing is cloned and it nil

game.Players.PlayerAdding:Connect(function(plr)
        plr.CharacterRemoving:Connect(function(me)
		local clonechar = me:Clone()
		clonechar.Parent = game.ServerStorage.Backup
		if game.ServerStorage.Backup:FindFirstChild(plr.Name) then
			game.ServerStorage.Backup:FindFirstChild(plr.Name):Destroy()
		end
		
 	end)

Worked for me

Your issue is your using serverstorage. I’d recommend using replicatedstorage.

ServerStorage is better even Roblox says it in wiki!

And that depends how your using it.

He wants to replicate something.

i got this error

07:42:25.739 - Archiveable is not a valid member of Model

Only server sided scripts can access the ServerStorage. ReplicatedStorage is for both Server and Local Scripts to access.

I store in ServerStorage because i don’t want it to access by client
I store character because i will make a combat log system that why