Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

how do i clone my self with a key?'

Asked by 6 years ago
Edited 6 years ago

ok so i want to clone my self by presing a key lets say Q how do i do it??

1 answer

Log in to vote
0
Answered by
SmartNode 383 Moderation Voter
6 years ago

I highly assume that you want that clone to be replicated. So here's my answer:

Stage 1 - Setup

  • Put a RemoteEvent called "PlayerClone" in ReplicatedStorage

  • Put a LocalScript called "CloneHandler" in StarterCharacterScripts located in StarterPlayer

  • Put a Script called "CloneStarter" in ServerScriptService

Stage 2 - LocalScript

01--[ Configuration ]--
02Key = Enum.KeyCode.Q
03Interval = 0.5 --> Put 'false' if you don't want a delay between each clone, otherwise intervals are counted in seconds.
04 
05 
06--[ Core Script ]--
07PlayerClone = game.ReplicatedStorage.PlayerClone
08UIS = game:GetService("UserInputService")
09Waiting = false
10 
11UIS.InputBegan:Connect(function(KeyPressed)
12 
13    if not Interval then
14 
15        Interval = 0
View all 40 lines...

Stage 3 - Script

01--[ Core Script ]--
02PlayerClone = game.ReplicatedStorage.PlayerClone
03 
04PlayerClone.OnServerEvent:Connect(function(plr)
05 
06    print('Got Signal!')
07 
08    local function Clone(plr)
09 
10        local Player = Instance.new('Model')
11        Player.Parent = plr.Character.Parent
12        Player.Name = plr.Name
13 
14        for _, object in pairs(plr.Character:GetChildren()) do
15 
View all 26 lines...

You're done!

Ad

Answer this question