I made a tool that copies your character when you activate it, however I keep getting the error:
Players.Player1.Backpack.Mirage/Remnant.LocalScript:9: attempt to index local 'clone' (a nil value)
I have no idea what this means nor how it can be rectified. The script is here:
local name = game.Players.LocalPlayer.Name .. "RNT" script.Parent.Activated:connect(function() if not game.Workspace:FindFirstChild(name) then local m = Instance.new("Model") m.Name = name m.Parent = game.Workspace local clone = game.Players.LocalPlayer.Character:clone() clone.Parent = m clone.Torso.CFrame = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector*2 clone.Name = "" clone.Humanoid.MaxHealth = 0 else game.Workspace[name]:destroy() end end)
Can anyone help?
You can clone the player, but only when the model's Archivable
value is set to true. It basically means it gets remembered by the game. Never set something's Archivable
value to false, it'll delete itself the next time you run/load your game.
So, try and set it to true. Also, call Clone()
with capitals, the lowercase version is deprecated:
part:Clone()
Hope I helped!
~TDP