How to clone yourself by pressing 1 key

How to make a clone by using

For i ,v in pairs(char:GetChildren)

I don’t thing you need to get the children of a character, I just think you need to just get the character itself, and clone that. That will clone all of the children too.

As for making it happen when pressing the 1 key, take a look at this:

1 Like

I’m assuming you mean the literal β€œ1” key so, you should use UserInputService and Enum.KeyCode (You will need a remote event, server script, and a local script).

local UIS = game:GetService("UserInputService")
local Event = --event here

UIS.InputBegan:Connect(function(key, typing) --runs when keys are pressed
    if not typing and key.KeyCode == Enum.KeyCode.One then --check if processed and is the "1" key
        Event:FireServer() --fire the event
local Event = --Event

    if plr.Character then --checks if the character exists
        plr.Character:Clone() --clone the character
1 Like