Part isn't spawning

I’m trying to make a simple part spawn in with a decal inside of it.

The main issue is the part never actually spawning in, but it’s in the explorer with its name and decal inside it with all of their properties that were changed listed.

I’ve tried a few more additions of more size properties but every time I check its size in-game, it says “0.00001, 0.0001, 0.00001”. The script itself works but there might be some extra property I’m missing where it isn’t being shown.

local Uglyman = Instance.new("Part")
local Spiderboy = Instance.new("Decal",Uglyman)

Uglyman.Name = "Uglyman"
Uglyman.Anchored = true
Uglyman.Color = Color3.new("255,255,255")
Uglyman.Material = Enum.Material.Neon
Uglyman.Position = Vector3.new("24.5,0.5,3.5")

wait(3)

Uglyman.Size = Vector3.new("12.5,1,2")
Uglyman.Material = Enum.Material.Plastic

wait(0.5)

Uglyman.Size = Vector3.new("12.5,11.5,2")

wait(0.5)

Spiderboy.Name = "Spiderboy"
Spiderboy.Texture = "http://www.roblox.com/asset/?id=8575813455"

Spiderboy.Transparency = 0.1
wait(0.1)
Spiderboy.Transparency = 0.2
wait(0.1)
Spiderboy.Transparency = 0.3
wait(0.1)
Spiderboy.Transparency = 0.4
wait(0.1)
Spiderboy.Transparency = 0.5
Spiderboy.Texture = "http://www.roblox.com/asset/?id=0"

Uglyman.Parent = game.Workspace
1 Like

Few notes:

Don’t parent an instance directly like that, Roblox announced and explained why here.

Now, why not spawn the part first and then edit its properties?

1 Like

How would I go about changing that line, can I reference it to its parent by specifying it like this?

Spiderboy.Parent = game.Workspace.Uglyman

– And what do you mean by spawning it first and editing its properties? I did use a part as a reference, and I’m practicing using Instance() by trying to spawn a part in.

You need to read the output, you should be getting a dozen errors.

You put a string inside of Color3.new, which expects three numbers. Get rid of the quotation marks to change it to numbers and to the same for the Vector3s. Run it again and read the output.