pasje1312
(pasje1312)
March 18, 2023, 7:44am
#1
does anyone know why this doesnt work?
wait(5)
game.Workspace.pasje1312:Clone()
^
username
7z99
(cody)
March 18, 2023, 8:17am
#2
Making two topics about the exact same issue with a single sentence to describe the issue within the span of an hour isn’t the best way to get an answer and can probably be considered spam for future reference. Next time please read the pinned topic on how to use and write topics in this category.
This is a support category for help on everything related to scripting on the Roblox platform, from extremely basic to even the most technical of issues.
Make sure to search the forum before creating a new topic, many beginner / learning resources have already been created, or maybe your problem has already been solved by someone else.
If you’re looking to show off your project and get opinions and feedback, please use #help-and-feedback:cool-creations instead!
Please do not post bug reports …
Did you search google or the forum for any answers? There is a plethora of answers on this exact topic already.
I was wondering how I could create a copy (or multiple) copy(ies) of a player in-game. I at first thought that I could change the humanoid’s CharacterAppearanceId, but then I realized that that only exists in players. The thing is, I can’t add a player either (because of privacy issues) How would I make clones like Clone Tycoon 2 did for their arena?
Hi i want to clone player character but it didn’t work
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(Chr)
local Clone = Chr:Clone()
Clone:SetPrimaryPartCFrame(CFrame.new(Chr.PrimaryPart.Position))
end)
end)
the error is :ServerScriptService.Script:4: attempt to index nil with ‘SetPrimaryPartCFrame’
I’m trying to build an in-game store/avatar customizer.
I’d like to clone my player’s current character into a ViewportFrame.
However, cloning a player’s character seems to fail silently.
If I create a new doc in Studio, join and type this code into the command bar:
local p = game.Players.Shedletsky.Character:Clone() p.Parent = game.Workspace
It throws because p is nil.
I don’t want to load a character from the website using CreateHumanoidModelFromUserId, because I am using custom charact…
You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
Cloning the players character
What is the issue? Include screenshots / videos if possible!
When cloning and parenting the cloned character to workspace it brings up this error : attempt to index nil with ‘Parent’
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Nope, couldn’t find any solutions
local Character = p…
I have a zombie script and I want to make it so that if a player died , their body becomes a zombie , but I don’t know how I can get the players character especially since they are already dead.
Hello,
So I’m trying to making the player’s dead character stay, but they will respawn, so basically have a clone on it. When I clone it in Server Mode in studio, I can do it perfectly, but when I do it through a script, it doesn’t work:
-- clone the player's character
local duplicated = workspace[character.Name]:Clone()
print('cloned')
-- make sure the character exists and the player didn't leave before this ran
if not duplicated then
print('doesn\'t exist')
return
end
…
local characterClone = character:Clone()
print(character, characterClone)
characterClone.Parent = playerIcon
Trying to clone the players character to put into a ViewportFrame, however, it’s returning as nil.
print(character, characterClone)
returns
NinjoOnline, nil
So, I was testing in my studio and I realized you can’t clone your character through a script. So, I got to work. I’ve tried every solution I had to think of, but none have worked so far. Is there a way to clone your character, or insert your character?
I’ve looked into a plugin that had a character inserter built into it, but it lagged me out of chrome lmao.
So when i cloned my character in a script and try to set some propities on it the character is = nil. Here is my script
script.Parent.RemoteEvents.BigSwingStarting.OnServerEvent:Connect(function(Player)
local Char = Player.Character:Clone()
Char.Parent = Player.Character
for i, v in pairs(Char:GetChildren()) do
if v.ClassName ~= "Part" then
v:Destroy()
end
end
Char.Parent = Player.Character
local Prime = Char:FindFirstChild("Head")
Prime:SetUnion(Char:GetChildren())
Prime.Positio…
Did those solutions not work? Did they not give you the expected result? What are you expecting and what is happening? Can you elaborate on what “doesn’t work” means? Is it an error? That would probably be a good idea to add to your post. Are you sure there’s a child of the workspace called “pasje1312” at the time the script runs? Why aren’t you accessing the character through the player? Have you tried debugging? Where is this script located? Is it a server script or a local script?