Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How would I set the face of a texture in a script?

Hello! I'm making an old roblox simulator called Nostalgia Studio and I am currently working on making surface types work. I've got the textures for studs, inlets and universal and I am currently trying to make it create a new texture for each brick created via a script, but I've had trouble setting the texture's face. Would I just use BasePart.surface or is there some sort of enumeration? I've googled it and no developer forum posts showed up, and the documentation had nothing about it in FaceInstance, Face, Decal, Texture or Enumerations

Anybody know the answer?

1 comment

0

Or do you mean the way the texture is facing ?

2 answers

✓ Accepted answer

Right = 0

Top = 1

Back = 2

Left = 3

Bottom = 4

Front = 5

Part.Texture.Face = "Top"

or

Part.Texture.Face = 1

I hope this is what you meant.

Even though this is answered by @Cirillix, I'm giving some information:

  • You can directly set the face by inserting the FaceName string, or use NormalId

  • Enumeration is not needed, but it's a Enumeration type

Good luck at your game!

This discussion is preserved as it was. New answers, comments, and votes are closed.