person330
|
  |
| Joined: 19 Oct 2008 |
| Total Posts: 194 |
|
|
| 23 Aug 2011 09:53 PM |
How do you add a new Decal to a Part in a script? Thanks in advance |
|
|
| Report Abuse |
|
|
ShoeBox4
|
  |
| Joined: 06 Apr 2011 |
| Total Posts: 890 |
|
|
| 23 Aug 2011 09:56 PM |
local Part = game.Workspace.LocationToYourPart local decal = Instance.new("Decal", Part)
Your welcome :D |
|
|
| Report Abuse |
|
|
person330
|
  |
| Joined: 19 Oct 2008 |
| Total Posts: 194 |
|
|
| 23 Aug 2011 10:17 PM |
Thanks Btw
does it also work like this?
function hit(h)
local O = h:FindFirstChild() local D = Instance.new("Decal",O) end
game.Workspace.Part.Touched:connect(hit)
|
|
|
| Report Abuse |
|
|
ShoeBox4
|
  |
| Joined: 06 Apr 2011 |
| Total Posts: 890 |
|
| |
|
|
| 23 Aug 2011 10:40 PM |
No.
function hit(h) local O = h:GetChildren()[1] local D = Instance.new("Decal",O) D.Texture = "Texture here" end
game.Workspace.Part.Touched:connect(hit) |
|
|
| Report Abuse |
|
|
person330
|
  |
| Joined: 19 Oct 2008 |
| Total Posts: 194 |
|
|
| 24 Aug 2011 01:21 PM |
I put this in:
Self = script.Parent
function hit(h)
local O = h:GetChildren()[1]
local D = Instance.new("Decal",O) D.Texture = "http://www.roblox.com/asset/?id=60104971" D.Face = 0 D.Transparency = 1
end
Self.Touched:connect(hit)
But it doesnt seem to be creating the decal. Am I, like, doing something wrong?
|
|
|
| Report Abuse |
|
|
|
| 24 Aug 2011 01:24 PM |
try this, not sure if it works
Self = script.Parent
function hit(h)
for i = 1, 6 do local D = Instance.new("Decal",h) D.Texture = "http://www.roblox.com/asset/?id=60104971" D.Face = i - 1 D.Transparency = 1 end
end
Self.Touched:connect(hit)
|
|
|
| Report Abuse |
|
|
bloob827
|
  |
| Joined: 01 Aug 2010 |
| Total Posts: 6867 |
|
|
| 24 Aug 2011 01:32 PM |
| What exactlyo are you trying to do? |
|
|
| Report Abuse |
|
|
| |
|
bloob827
|
  |
| Joined: 01 Aug 2010 |
| Total Posts: 6867 |
|
|
| 24 Aug 2011 01:36 PM |
Well, i'm goin' to assume you want the face to be a different texture?
script.Parent.Touched:connect(function(h) game.Players:playerFromCharacter(h.Parent).Head.face.Texture = "http://www.roblox.com/asset/?id=60104971" end)
|
|
|
| Report Abuse |
|
|
person330
|
  |
| Joined: 19 Oct 2008 |
| Total Posts: 194 |
|
|
| 26 Aug 2011 08:18 PM |
I have tried both Zito's and Bloob's scripts, they both don't seem to work either. Is Roblox having a problem with adding new decals or something? |
|
|
| Report Abuse |
|
|
person330
|
  |
| Joined: 19 Oct 2008 |
| Total Posts: 194 |
|
| |
|