How to make a UI that when it reaches the top the text color changes and the text stroke color changes?

script.Parent.MouseEnter:Connect(function()
	script.Parent:TweenPosition(UDim2.new(0.049, 0,0.563, 0))
end)

script.Parent.MouseLeave:Connect(function()
	script.Parent:TweenPosition(UDim2.new(0.049, 0,0.335, 0)) 
end)```
1 Like

Your probably fed up of seeing me at this rate!

script.Parent.MouseEnter:Connect(function()
script.Parent:TweenPosition(UDim2.new(0.049, 0,0.563, 0))
script.Parent.TextColor3 = Color3.new(Pick a color)
script.Parent.TextStrokeColor3 = Color3.new(Pick a color)
end)

script.Parent.MouseLeave:Connect(function()
script.Parent:TweenPosition(UDim2.new(0.049, 0,0.335, 0))
you can make it back to normal
end)```

does this go inside a different script? if so what script?

no, still the same scrpt that your using

ok, thanks alot ill solution you in a bit!

@instanitly

hey uh how do i make it so it goes back to normal after it comes back down?

Anyone got any idea, not got a idea?

You change it to the color that it was before.

How in the code though??? :thinking:

1 Like
script.Parent.MouseEnter:Connect(function()
   script.Parent:TweenPosition(UDim2.new(0.049, 0,0.563, 0))
   script.Parent.TextColor3 = Color3.new(*Color you want to change to*)
   script.Parent.TextStrokeColor3 = Color3.new(*Color you want to change to*)
end)

script.Parent.MouseLeave:Connect(function()
   script.Parent:TweenPosition(UDim2.new(0.049, 0,0.335, 0))
   script.Parent.TextColor3 = Color3.new(*Color that it was before*)
   script.Parent.TextStrokeColor3 = Color3.new(*Color that it was before*)
end)

But if you want to Tween color you need to use TweenService.

It broke for some reason, any idea why?

Did you change the “Color that it was before” and “Color you want to change to” to RGB values?

1 Like

I changed them using the color pallet that came up!

Can you copy and paste reply to me what is the error that you received in the output?

No error, heres the code:

script.Parent.MouseEnter:Connect(function()
	script.Parent:TweenPosition(UDim2.new(0.049, 0,0.563, 0))
	script.Parent.TextColor3 = Color3.new(0.458824, 0.458824, 0.458824)
	script.Parent.TextStrokeColor3 = Color3.new(0.635294, 0.635294, 0.635294)
end)

script.Parent.MouseLeave:Connect(function()
	script.Parent:TweenPosition(UDim2.new(0.049, 0,0.335, 0))
	script.Parent.TextColor3 = Color3.new(255, 255, 255)
	script.Parent.TextStrokeColor3 = Color3.new(70, 70, 70)
end)

What is broken, the colors or the tweening?

I’ll record it, give me a couple minutes.

1 Like

robloxapp-20201023-1334136.wmv

(sorry its a download)

Edit: Fixed, they weren’t real values!