Roblox clone is nil PlayerGui. (UNRESOLVED) Help and Feedback. Players. The bulb on the server is just nil too, because you’re essentially trying to clone nil, which is just nil. LocalPlayer RE = script. Modules. insert loop could be clearer. PlayerViewport NPCDummy = What I’m trying to do is detect if the Parent of a touched part (hit) has a child named “TrashWeld. What is the issue? Include screenshots / videos if possible! The data is always nil no matter what. This way, I can make it visible on the client side, so only a specific player can see it. KnifeThrow3. You have to change the text not locally or get the text locally. NPCTextGui. 3. Issues = the player. OnServerEvent:Connect(function(Player) local I’m trying to develop a landmine in my game, and I want it to make it so that if no player ever steps on the user’s (the user is the player who placed down the landmine) the player can hit the E button to detonate the most recent landmine they’ve put down. I’m making a basic spell for my game and this requires me to clone an object. What do you want to achieve? Keep it simple and clear! Clone a Model (basically a NPC) on death What is the issue? Include screenshots / videos if possible! attempt to index nil with ‘Archivable’ Error: ServerScriptService. ElevatorPad local Intermission = 30 local IntermissionQueued = So when i cloned my character in a script and try to set some propities on it the character is = nil. Local script = makes a textlabel and puts the text as player. The logging function (logs) is clever, but a simple table. initialize(). CharacterAdded:Wait() end local plrClone = char:Clone() plrClone. ClonePlayer:12: attempt to index nil with ‘Archivable’ - Server - Hello, I have a small issue with my script where the NPCDummy is apparently nil even though its just been created by the script: plr = game. Although I tried doing this, I’m currently facing an issue where for some reason the bombClone (The cloned handle Hello! I have made two scripts, a server and local scripts. LocalPlayer local char = player. Yet for some reason after I’ve cast the spell once it doesn’t fire. Server Script: function CloneBrick(player) if db[player] == true then db Yo, I’m currently working on a ragdoll system that will clone the player when they die/respawn. Parent = plr. The data store script is the one used in the gnome code tower defences series. That still leaves me with the So this is the code and take note of the two print statements on line 42 and line 44. 2. Parent = bait ExampleUI. I suggest having it choose a random map if the result of ‘CalculateWinner’ is nil This is happening in multiple scripts, once script is there to inject a copy of a script into the player Depending on a Numbervalue. scripting, help. Parent = Player. This is happening because, by default, Roblox sets the Archivable property of the character model to false. Im Creating A Building System like the game oga boga and when i get the CFrame and a String says: ReplicatedStorage. Name. Crafting:26: attempt to index nil with 'Clone' - Server - Crafting:26 here’s the code: Local ‘chosenMap’ can be nil if no one voted at all. initalize() should be core. random(1, #spawnLocations:GetChildren ())] if previousSpawn ~= nil and previousSpawn == chosenSpawn then repeat screenshot of code from the official Clone() function page on DevHub | Roblox. ayonoobieyoutube (LegendGamingRoblox) March 17, 2025, 5:22pm #1 (topic deleted by author) Home ; Categories ; FAQ/Guidelines I have this round system for my new game and I dont know whats wrong. ReplicatedStorage. Parent = children [i]” if the print line “Could not find Sword” works then you need to find the sword You are trying to clone a non existing object, but you don't show the line of your script with the error (or I can't see it as you don't show the lines at all) so I couldn't be more precise right now (ENGLISH IS MY SECOND LANGUAGE, I MIGHT HAVE GRAMMAR PROBLEMS) So, i just wanted to recreate sbeve from Slap Battles, so i made a cloning script. ” The TrashWeld part has RopeConstraints as children. Archivable “This property determines whether the instance should be included when the experience is published or saved, or when Clone() is called on one of the instance’s ancestors. One way you can get the text locally is using a RemoteFuntion. Did roblox remove :Clone()? Heres what I have `local players = {} local maps = {} local ElevatorSongs = {} local MapInProgress = false local MapRemoved = true local Waiting = true local ElevatorPart = game. ServerScript = makes a number value and stores it inside a folder which is in the script. Scripting Support. wait(15 * 60) – Waits 15 minutes local chosenSpawn = spawnLocations:GetChildren()[math. Also, instead of printing logs at multiple places, consider consolidating them. That is why the bulb parameter on the server is nil. local copy = model:Clone() <details><summary>Error</summary></details> should be local copy = original:Clone() <details><summary>Code sample w/ fix</summary>-- Get a reference to an . Character if not char then char = player. The copy of the root instance is returned by this method and its Parent is set to It looks like you're trying to find Track1, Track2, Track3, and so on in your workspace. Server Script: function CreateBaitUI(bait) local ExampleUI = RS:WaitForChild("Bait_Arrow"):Clone() ExampleUI. local the text is changed locally. OnServerEvent:Connect(function(Player, CF, X, Y, Z, ToPos, Start) local RS = game:GetService("ReplicatedStorage Not sure why its asking for vector3, doesn’t vector3 dictate size rather then position? local rs = game:GetService("ReplicatedStorage") local stunnedevent = rs:WaitForChild("StunnedEvent") local HitboxModule = require Hello! I have made two scripts, a server and local script. It functioned fine a while ago, however I changed a bit of code and now it doesn’t. Character. Archivable = true print (Clone,Character) Cloning a character requires it’s Archivable So when i cloned my character in a script and try to set some propities on it the character is = nil. name, then sent it as a remote event to the client In my local script it recieves a remote function and makes a text label and sets the text as player. EthanBlox_TV (Ethan) October 12, 2020, 6:15am things you need to know: in a local script character doesnt return nil but clone does Code example local player = game. I have no clue why this I’m having a problem where any object I clone is coming out as nil. script. Do these actually exist? If they don't, you'll get "attempt to index nil with Clone" Either script. HealthDrink:FireServer() end) What do you want to achieve? Keep it simple and clear! To get the players data. Parent = workspace --errors out on this line. By default, a player’s character has its “Archivable” property set to false. ) 2. Char. BL isn't an object with a Clone() function, or PlayerToBlind isn't an object with a WaitForChild() function. for i, v in pairs Clone () creates a copy of an instance and all of its descendants, ignoring all instances that are not Archivable. Yes, I’ve made sure that nothing is The problem is, the bulb from the client is nil on the server, because anything you do on the client doesn’t replicate to the server. (“initialize” is the correct spelling. (Imma call this Part-Injection-Script) This is really weird: So basically, sometimes when I playtest the game (even when I do not touch Can't clone character? - Scripting Support - Developer Forum | Roblox Loading 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 The code samples documented on the Instance:Clone function page attempts to index a non-existent variable due to a slight oversight. As of 7/10/21, the Clone() function seems to break when setting a cloned instance to workspace or other instances. BigSwingStarting. Parent. name in the textlabel is nil. RemoteEvents. Using a for loop, I tried to iterate through all the RopeConstraints, detecting if the Parent of either the Attachment0 or Attachment1 of those RopeConstraints has a Parent that is equal to the touched part. Functionality An example of how you could do this using a RemoteEvent . Parent local Clone = Character:Clone () Clone. Then it recieves the remote event that was sent from the server script, and clones that text local previousSpawn = nil local spawnLocations = nil --// if the variable exists remove else set this to your spawnpoints. Adornee = bait This is because while the kid is not nil, if the kid’s archivable is set to false it won’t clone, hence the cloned kid being nil. PlrDummy:Clone() PlrDummy. plrClone. I still can’t understands why, because as you can see the object exists and it’s i have a problem that the new players data is a clone from old players in the same server here is the part that i think had the problem: repeat Success, PlayerData Developer Forum | Roblox Attempt to index nil with clone, tried every debug but failed. I know that there’s a simple answer to this, and that’s to have a check to make sure that the character isn’t nil. In my server script I made a stringvalue and set the value to player. . Calling Clone() directly on an instance will return nil if that instance is not Archivable. I don’t know why,but I’ve already tried fixing this problem several times,I’ve already tried using other sources or rewriting the entire script,but sadly none of this worked. InitiateConversation PlrDummy = game. If you can break the operations into a few different lines local ClientStructure = Structures:FindFirstChild(structureButton. Special. My problem is that the local script prints the Cloned Part as nil and won’t change its transparency. ”. Here is my script. 1)So now I Server script game. core. Logging Optimization. Also, fires a remote Event through a for loop, with the parameters, ReceivePlayer, player. Workspace. (Imma call it Script-Injection-Script) In the other script it should insert a copy of a mesh into workspace. Name):Clone()ROBLOX SAYS THE ERROR IS HERE ClientStructure. Any solutions? I have absolutely no idea why this isn’t working. BrickColor = BrickColor. here is the server module: i dont think you need the whole function since only these 3 lines are associated with axe I have a local script that will call InvokeServer() to clone an item from server storage and place it into replicated storage. (I am in fact,using the utmm kit 2. From there, the cloned item is returned and should be used by the code snippet below to change its parent to a viewport frame. Instance. name. The issue lies on line 4. Now the console prints the line 42 without a problem and show the pointer in the console, however on cloning GUI then returns nil, then any ideas? Issue So what’s happening is I cant actually get my script to function correctly. Improvements & Fixes 1. Here is my script script. It will run in a server script (with alterations to the player name of course), but not local. MouseButton1Click:Connect(function() game. What solutions have you tried so far? Did you look for solutions on the Developer Hub? I have Attempt to index nil - Scripting Support - Developer Forum | Roblox Loading ;-;im trying to make a super fast shooting turretn gear and ive spent 3 weeks perfecting da c pde but ihave some weirdo bugs that are really weird because lookinmg at the code this impossible bugs: wen you exhaust all ammunition, you fire an extra round after tool gets off coldown!? bugs: sometimes the camera lock doesnt stop when it supposed to i tried it all ok I’m trying to clone a part in a server script in ServerScriptService and then send it to a local script with a remote event. Name = "PlrClone" other than that, the title Hey there, been on this issue for awhile now and cant get it to work at all. ToolEvents. Initialization Function Naming. Hey there everyone, today I made a script that fires to all clients when a pet is equipped, but on the client side it prints the pet as nil here is my module script: -- SERVER local PetsModule = {} local TweenService = game:GetService("TweenService") local RunService = game:GetService("RunService") local Functionality = game. new("Forest Green") try this insted of “map:FindFirstChildWhichIsA (“Tool”):Clone (). In this case I am trying to clone a gui that is stored in replicated storage (RS) and parent it to a part (bait) that is stored in a folder in the workspace. I tried using For some reason, sometimes the character is being indexed as nil. while true do task. Archivable determines if something can be cloned and if it can be Just do: local Character = script. local script - in a Gui. Even though he’s still alive for some reason, the character is being indexed as nil <details><summary>Script</summary>local status = game:GetService("ReplicatedStorage"):WaitForChild("Status") local serverstorage = So i have a code that clones all objects from workspace and i want to move then to viewport frame, but it keeps saying me that cloned objects don’t have parent? Here’s code and output screenshot: So the thing is when cloned object has parent is says it parent, other way it says no parent. bsi occvsdf uij vcsqls bfzx fuluthso oygst lssl bkn zqmig ksdw yzav zdkvlhx mfxbet cbrd