Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Cant change colour of tint screen?

Asked by 3 years ago

Trying to make an input change the colour of the screenstint, nothing to difficult though this is my first time doing this and i cant figure it out

local ui = game.StarterGui.HUD
local screen = game.Lighting.Screen

local Open = true

local UserInputService = game:GetService("UserInputService")

UserInputService.InputBegan:Connect(function(keyCode)
    if keyCode.keyCode == Enum.KeyCode.V then
        if Open then
            Open = false
            ui.Enabled = false
            wait(0.5)
            screen.TintColor = "0, 0, 0"
        else
            Open = true
            screen.TintColor = "212, 235, 255"
            wait(0.5)
            ui.Enabled = true
        end
    end
end)

1 answer

Log in to vote
1
Answered by
sayer80 457 Moderation Voter
3 years ago
Edited 3 years ago

You have to create a new Color3 and 0-255 is fromRGB, and also you have to change the color and not get the instance.

screen.TintColor.BackgroundColor3 = Color3.fromRGB(0,0,0)
--
screen.TintColor.BackgroundColor3 = Color3.fromRGB(212, 235, 255)
1
Works but now the HUD wont disable DraconianSG 58 — 3y
1
nvm got it DraconianSG 58 — 3y
Ad

Answer this question