How Tween Service color brightness of a mesh part

  1. I want to make the brightness of my mesh part darker with each loop using Tween Service

  2. I don’t know how to do

  3. I didn’t have any ideas in mind.

and this is the script

1. > while Value ~=60 do
2. > 			Value +=5
3. > 			task.wait(0.1)
4. > 			local Model = CreateCloudModule.CreateStand(rv, 10, Value)
5. > 			game.Debris:AddItem(Model,1.7)
6. > 			task.wait(1.7)
7. > 			local Parttween = {}
8. > 			Parttween.Size = rv.CloudMunicipe.Size + Vector3.new(14.539, 9.464, 23)
9. > 			Parttween.Position = rv.CloudMunicipe.Position + Vector3.new(0, 9.464, 0)
10. > 			Parttween.Color =
11. > 			local partweninfo = TweenInfo.new(0.7, Enum.EasingStyle.Exponential)
12. > 			local parttt = game:GetService("TweenService"):Create(rv.CloudMunicipe, partweninfo, Parttween)
13. > 			parttt:Play()
14. > 		end
15. > 		if Value == 60 then
16. > 			Value = 0
17. > 		end

pls help, thanks :grinning:

1 Like

lets say your rgb values are 20,20,20
if you make it 10,10,10 then it will be darker
if you make it 30,30,30 then itll be brighter

basically add the same amount to each value to make it brighter and subtract to make it darker
hope i helped

1 Like

i aldery try it but isin’t working, im trying like

while value ~= 60 then
Part.Color = Color3.fromRGB(-10, -10, -10)
end
if value == 60 then
value = 0
end

its like degrade to darker in every loop

isnt that what you wanted to do? to make it darker every loop?

yes is that, but dont function

what happens when you do that?

just set the part in the color

or even do nothing, im using tween service to set the color

and you want the texture to change color?

if i would have a problem like this i would do it l ike this:

local v1 = 30
		local v2 = 30
		local v3 = 30
		while Value ~= 60 do
			Value += 5
			if v1 > 0 then
				v1 = v1 - 1.5
			end
			if v2 > 0 then
		v2 = v2 - 1.5
			end
			if v3 > 0 then
		v3 = v3 - 1.5
			end
			task.wait(0.1)
			local Model = CreateCloudModule.CreateStand(rv, 10, Value)
			game.Debris:AddItem(Model,1.7)
			task.wait(1.7)
			local Parttween = {}
			Parttween.Size = rv.CloudMunicipe.Size + Vector3.new(14.539, 9.464, 23)
			Parttween.Position = rv.CloudMunicipe.Position + Vector3.new(0, 9.464, 0)
			Parttween.Color = Color3.fromRGB(v1, v2, v3)
			-- other stuff here
		end

in the script he mentioned “size and position” and u cannot set those on a texture

You don’t need to loop multiple times, you can just do a single tween once and set the color to 0,0,0.

		local Parttween = {}
		Size = rv.CloudMunicipe.Size + Vector3.new(14.539, 9.464, 23)
		Position = rv.CloudMunicipe.Position + Vector3.new(0, 9.464, 0)
 		Color = Color3.FromRGB(0, 0, 0)
		local partweninfo = TweenInfo.new(0.7, Enum.EasingStyle.Exponential)
		local parttt = game:GetService("TweenService"):Create(rv.CloudMunicipe, partweninfo, Parttween)
		parttt:Play()

hes asking to make the color darker EACH LOOP not in 1 tween u saw in his script he could done it alone so.

Yes, but he doesn’t need to put the tween in the loop. He could put the tween outside the loop and have the loop still there to do the rest.

Hi so, i try this script but the Part just get black

[Edit: The information I shared here was incorrect so I removed it]

still not working
why ;( is it my bad script?

Color3.new*

Oh yeah, you’re right.

My bad, I should’ve checked last time.

the result is strange, look