Is there any way to tween material colours?

So I found a way to change the material colour, but I want to tween it

Now I know that you can use a gui and tween the colour there and change the material colour to whatever the gui is, but it seems performance bad and not very conventional.
Also, if i were to use the method i would have no way of telling how much times to tween, even if use 2 seconds i know two seconds and i can do it for i = 1,20 do end and use a bindableevent but that seems just too performance bad

2 Likes

Can’t you just do:

TweenService:Create(Thing, TweenInfo, {Color = Color3.fromRGB(255, 255, 255)}):Play()

I don’t really understand your question.

2 Likes

Changing the colour of the terrain from what I heard cannot be achieved without the use of this sole function Terrain:SetMaterialColor(material, Color3)

I don’t think there is an efficient way to do this, though I’ve never tried before myself. Your best bet would probably be to either use a for loop or tween a color value and use .Changed to update the color, though there could be performance hits from these methods depending on how expensive that function is.

1 Like

Thats exactly what I said, I am asking for an alternate way that does not hinder performance

Nope. There isn’t an alternate way to change the material colours in the first place, therefore not an alternate way to accomplish your system at all. You have to tween a Colour3(Value) and call SetMaterialColor on each step.

I don’t necessarily think that changing the colour is going to be performance heavy but you’re welcome to benchmark it since it doesn’t seem like you’re sure of if it actually affects performance or not.

2 Likes