Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why Won't the part with the decal show up?

Asked by 9 years ago

I'm trying add a Bullet hole system to my gun to whenever i shoot the ground a Bullet hole decal shows up. Pretty much like TurboFusion's gun's . The problem is that nothing is popping up on the ground , there is no output, and it also won't show up in the workspace.

Here is the script.

BulletHole = Instance.new('Part', workspace)
    BulletHole.FormFactor = Enum.FormFactor.Custom
    BulletHole.Size = Vector3.new(1, 1, 1)
    BulletHole.BrickColor = BrickColor.new("Black")
    BulletHole.Shape = Enum.PartType.Block
    BulletHole.CanCollide = false
    BulletHole.CFrame = CFrame.new(bulletPos) 
    BulletHole.Anchored = true
    BulletHole.Transparency = 1
    BulletHole.TopSurface = Enum.SurfaceType.Smooth
    BulletHole.BottomSurface = Enum.SurfaceType.Smooth
    BulletHole.Name = 'BulletHole'

    local BulletHoleMesh = Instance.new("BlockMesh",BulletHole)
    BulletHoleMesh.Scale = Vector3.new(1,1,1)
    BulletHoleMesh.Offset = Vector3.new(bulletPos)

    local BulletHoleDecal = Instance.new("Decal", BulletHole)
    BulletHoleDecal.Face = Enum.NormalId.Front
    BulletHoleDecal.Texture = "http://www.roblox.com/asset/?id=2078626"
    DebrisService:AddItem(BulletHole, 3)
    return BulletHole
end

Can someone please help me?

0
You are setting the transparency to 1. TickerOfTime 70 — 9y
0
No i did that so that the block is invisible and it only shows the decal. purplemetro3421 5 — 9y
0
Setting the offset is not needed, I think. Try it without changing the mesh's offset. TheDeadlyPanther 2460 — 9y
0
Sadly that still won't do the trick :( purplemetro3421 5 — 9y

Answer this question