Confused on how I should be Changing Color based on the Items Size

So Right now I am having issues on how I should be Tweening Color based on an Items Size, I have tried a couple of things and I have even tried looking it up, but I have not not found Anything relevant to what I want to do.

How should I be doing this?

e

Not asking for Script btw, just asking how I should be doing it as in explanation

What are you trying to achieve more crearly? What I think would go is like:

if size < size1 and > size2 then
colour = colour1
else 

Or something like that m

Not really what I’m asking.

Changing a Items Color based on its Size, Like with a UI, you can tween its size, I was wondering how should I make a tweening effect for the Color.

Oh, you meant to tween the colour and only that, I’m new to that but I’m pretty sure you can simply do:

local target = {Colour 0,0,0}

Or something like that, I’m not sure tho

Like this, but it within a set limit, so like if I had 100 health, it would be green, but if it was at 0, it would be red, and everything else in between is a color in between those 2 colors.

Ok, I understand now, you would do something like:

local target = {Color3 = part.Color3.new(anything,anything,anything)} --not sure if that’s how you do it, but I’m sure you know
local otherTarget = {Color3 = part.Color3.new(anything, anything, anything}

Or soemthgin like that, you could also do soemthgin like:

color = humanoid.Health //*/+/- anyNumber

And put that as the target

Well, I figured it out, I had to use Color3:Lerp()

green = Color3.new(0,1,0)
red   = Color3.new(1,0,0)

Item.BackgroundColor3 = red:Lerp(green, health/maxHealth)

See, you figured out, I didn’t even know half of what you were talking about :rofl::rofl::rofl:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.