generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Adding Decals

Previous Thread :: Next Thread 
person330 is not online. 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 is not online. 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 is not online. 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 is not online. ShoeBox4
Joined: 06 Apr 2011
Total Posts: 890
23 Aug 2011 10:21 PM
I think so.
Report Abuse
BunnyBoy26 is not online. BunnyBoy26
Joined: 17 Jun 2010
Total Posts: 5674
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 is not online. 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
litozinnamon is not online. litozinnamon
Joined: 21 Dec 2009
Total Posts: 891
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 is not online. bloob827
Joined: 01 Aug 2010
Total Posts: 6867
24 Aug 2011 01:32 PM
What exactlyo are you trying to do?
Report Abuse
litozinnamon is not online. litozinnamon
Joined: 21 Dec 2009
Total Posts: 891
24 Aug 2011 01:34 PM
i have no idea
Report Abuse
bloob827 is not online. 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 is not online. 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 is not online. person330
Joined: 19 Oct 2008
Total Posts: 194
26 Aug 2011 08:18 PM
Sorry, Litoz*
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image