How i can change the color sequence of a UIGradient in a script?

  1. What do you want to achieve? I wanna change the color of UIGradient in my script

  2. What is the issue? I have no idea how to do it.

  3. What solutions have you tried so far? I looked in dev forum but i didn’t found something similar


if status == "You Lost.." then
		screen.Title.Text = "You Lost.."
		screen.Musics["You Lost"]:Play()
		screen.Title.TextColor = Color3.fromRGB(255, 0, 0)
		screen.Title.UIGradient.Color = ColorSequence.new()
		screen.Title.UIStroke.Color = Color3.fromRGB(85, 0, 0)
		screen.Content.Rewards.LoseReward.Visible = true
		screen.Content.Rewards.WinReward.Visible = false

	elseif status == "TRIUMPH" then
		screen.Title.Text = "TRIUMPH!"
		screen.Musics.Victory:Play()
		screen.Title.TextColor = Color3.fromRGB(255, 255, 0)
		screen.Title.UIGradient.Color = ColorSequence.new()
		screen.Title.UIStroke.Color = Color3.fromRGB(85, 0, 0)
		screen.Content.Rewards.LoseReward.Visible = false
		screen.Content.Rewards.WinReward.Visible = true
	end

ColorSequence.new has several overloads for creating ColorSequences, I would recommend reading the documentation on it:

1 Like

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