Part not being named with Instance.new()

Hey devforum, for some reason when I make a part inside of a script with Instance.new() and try and name it “Drop”, it wont name it at all but the script will still run without any errors

Script:

local dropper = script.Parent

while wait(5) do
	local drop = Instance.new("Part")
	
	drop.Name = "Drop"
	drop.Position = dropper.DropperPart.Position
	drop.Size = Vector3.new(1,1,1)
	drop.Color = Color3.new(0.290196, 0.227451, 0.0745098)
	drop.Material = Enum.Material.CorrodedMetal
	drop.Parent = dropper
	drop.Anchored = false


	local cashvalue = Instance.new("NumberValue")
	cashvalue.Value = dropper.DropperPart.ValueSetter
	cashvalue.Name = "CashValue"
	cashvalue.Parent = drop
end
1 Like

I see nothing wrong with it. any screenshot from in game? like when it makes a part for it.

1 Like

image

check the name of the part in the Explorer

All the parts your seeing in the explorer are from a parent the dropper itself

are there any script that handles the drop parts? also I can see that the NumberValue is not inside the drop parts maybe the created part that doesn’t have a name is not the actual Part that has the name Drop

2 Likes

The one you saw from the post above

These are inside the dropper object, and aren’t just unnamed parts from other parts of the game, like the conveyor, right? Is there also anything in the output?

Yes, and theres nothing in the output

1 Like

So how would fix this, just quick note to there is another script for a collector

can you change drop.Parent = dropper to drop.Parent = workspace and post a picture of explorer again?

I tested this and it seems to work fine for me. Like @Sorbious mentioned the NumberValue doesn’t seem to be in the parts, so this could mean there’s an external influence. Check your other scripts, perhaps there’s an older script, or it hasn’t saved. (Commits may be enabled)

When you start the game, use the Find feature of explorer and put the name Drop and let’s see if it doesn’t replicate at all.

I think I figured it out, let me test it first

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.