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

Is htere any way to do instance.new part with a decal on it?

Asked by 9 years ago

Hello! This is a blood script I have and I was wondering if I could create the part with a decal on it?

s.Humanoid.Died:connect (function ()
wait (0)
P1 = Instance.new("Part",game.Workspace)
P1.Position = script.Parent.Torso.Position
P1.TopSurface = "Smooth"
P1.BottomSurface = "Smooth"
P1.BrickColor = BrickColor.new("Bright red")
P1.FormFactor = 2
P1.Size = Vector3.new(1,0.4,1)
P1.CanCollide = true
P1.Anchored = false
0
Why does this question have -2 points? minikitkat 687 — 9y

3 answers

Log in to vote
1
Answered by 9 years ago

This is the full script you wanted.

s.Humanoid.Died:connect (function ()
wait() --changed to wait() insted of wait (0)
local P1 = Instance.new("Part", game.Workspace)
P1.Position = script.Parent.Torso.Position
P1.TopSurface = "Smooth"
P1.BottomSurface = "Smooth"
P1.BrickColor = BrickColor.new("Bright red")
P1.FormFactor = 2
P1.Size = Vector3.new(1,0.4,1)
P1.CanCollide = true
P1.Anchored = false

local decal = Instance.new("Decal")
decal.Parent = P1
decal.Texture = --texture id here
decal.Face = "Top"
0
YAY! thank you! That worked! minikitkat 687 — 9y
0
Its alright. Accept this answer if it helpled > ConnorVIII 448 — 9y
Ad
Log in to vote
0
Answered by 9 years ago

Yes. Just do this:

local decal = Instance.new("Decal", P1)
decal.Texture = --texture id here
0
Okay, I have tried but I can't figure out how to make this so it goes on the Top and Bottom Surface. Any help? minikitkat 687 — 9y
Log in to vote
0
Answered by
dyler3 1510 Moderation Voter
9 years ago

In response to your above comment, to get it on whichever face you want, you can just do something like this:

decal.Face = "Top"--(This can be any of the following: Top, Bottom, Front, Back, Left, or Right)

This will change the side of the part that the decal is on. Hope I helped :P

0
This still did not work. The output says this:15:50:58.926 - decal is not a valid member of Part. And the decal goes on the front, And there is no texture. Any other soulutions? minikitkat 687 — 9y

Answer this question