Easy part gradient module

I made a really simple module for making gradient parts (Using surface gui). Currently works only on basic parts with block shape.

Showcase:


How it works:

local GradientPart = require(game.ReplicatedStorage.GradientPart)

GradientPart.GradientPart(workspace.Part,ColorSequence,Enum.NormalId.Top,false)

--[[
The first value is the object (the part)
The second value is the Color Sequence
The third value is the face the gradient should begin from
The fourth value is an Boolean value which tells if the Gradients should be paranted to the Part or no
(true == Parent to part)
]] 

The test project
GradientPart.rbxl (34.3 KB)

and the module
GradientPart Module

The module was made just for fun but it can probably be useful to somebody

8 Likes

Can’t you already do this with ui gradients?

1 Like

u cant gradient a part using UI gradients only

3 Likes

Nice, how does this work and what about performance?

it uses surface gui with frames in it. The frames have ui gradient which are the objects that change the color. Depending on the side, the Ui gradient will be rotated and colored with the given color.

About the performance.
it won’t affect it if it’s for 1 time use (like making it just black white part). About the constant changing of the color sequence, i would recommend using it on the client since the constant looping can indeed make some regional serger performance issues

Your creations are amazing but i really recommend decal instead of surface gui, because in surface gui it will just make it to:


In decal:

Fading image decal may do it though! The first color will be the part and the 2nd color is the decal

that’s a thing i started making.

so far it works but It support maximum 2 colors

(probably gona what till layered surface gui is a thing)

Decals currently don’t support UIGradient’s unfortunately. If they did though this would be a good idea in theory.

Well, my point is not using a UIGradient. but the decal texture is a fade image.

1 Like

https://i.gyazo.com/fa563b7fb10be9ad79a984abee56e3fc.mp4

i actually succeeded in some form
I may use texture instead of decals since i can easily offset it