Sets the texture object's image or color. Returns nil if the texture could not be set (e.g. if the file path is invalid or points to a file which cannot be used as a texture).

Signature:

visible = Texture:SetTexture("texture") or Texture:SetTexture(red, green, blue [, alpha])

Arguments:

  • texture - Path to a texture image (string)
  • red - Red component of the color (0.0 - 1.0) (number)
  • green - Green component of the color (0.0 - 1.0) (number)
  • blue - Blue component of the color (0.0 - 1.0) (number)
  • alpha - Alpha (opacity) for the color (0.0 = fully transparent, 1.0 = fully opaque) (number)

Returns:

  • visible - 1 if the texture was successfully changed; otherwise nil (1nil)