I don't understand how to fix this script

Hi,

so basically this script makes it so it creates two mesh parts and each have an individual mesh id. So its suppose to turn into that mesh id but it doesn’t. I also made it so the two parts will be anchored but their not.

script:

local Group = Instance.new("Model", game.Workspace)
local Glow = Instance.new("MeshPart", Group)
local Outside = Instance.new("MeshPart", Group)

Glow.Size = Vector3.new(0.45, 0.45, 0.45)
Outside.Size = Vector3.new(0.5, 0.5, 0.5)

Glow.MeshId = "rbxassetid://7763866204"
Outside.MeshId = "rbxassetid://7763869247"

Glow.Position = Outside.Position
Outside.Position = Vector3.new(0,0,0)

Glow.Anchored = true
Outside.Anchored = true

From,
File

1 Like

I suppose the problem is that you’re trying to set the meshid of a meshpart, try with a specialmesh instead

1 Like

I’ve edited your script to fix the problem using specialmesh:
Result:
image

local Group = Instance.new("Model", game.Workspace)
local GlowPart = Instance.new("Part", Group)
local OutsidePart = Instance.new("Part", Group)

local Glow = Instance.new("SpecialMesh")
Glow.Parent = GlowPart

local Outside = Instance.new("SpecialMesh")
Outside.Parent = OutsidePart

Glow.Scale = Vector3.new(0.45, 0.45, 0.45) -- Scale was size before
Outside.Scale = Vector3.new(0.5, 0.5, 0.5) -- Scale was size before

Glow.MeshId = "rbxassetid://7763866204"
Outside.MeshId = "rbxassetid://7763869247"

GlowPart.Position = GlowPart.Position
GlowPart.Position = Vector3.new(0,0,0)

GlowPart.Anchored = true
GlowPart.Anchored = true
1 Like

for like this ^ can it be

local Glow = Instance.new("SpecialMesh", GlowPart)
1 Like

Yes it can, however, I’ve seen posts saying that this method is inefficient, but do it to your liking.

1 Like

also im trying to make it so glow parts material is neon.

I wrote it like:

GlowPart.Material = "Neon"

But it doesn’t change.

Hello FileRecovered, try changing this part of the script to this.

Glow.MeshId = "http://www.roblox.com/asset/?id=7763866204"
Outside.MeshId = "http://www.roblox.com/asset/?id=7763869247"

1 Like

I now just changed it to this but its still doesn’t work.

GlowPart.Material = Enum.Material.Neon
1 Like

You probably need to do it for the OutsidePart one too