Here is my script.
local DeletePart = script.Parent.Parent.Delete
local Green = script.Parent.Parent.Signals.Green
local Red = script.Parent.Parent.Signals.Red
local Signal1 = script.Parent.Parent.Signal1
local Signal2 = script.Parent.Parent.Signal2
local Manual = game.ServerStorage.Values.Manual1
local SignallerMenu = game.StarterGui.SignallerMenu
local GreenSignallerMenu = SignallerMenu.Frame.Green1
local RedSignallerMenu = SignallerMenu.Frame.Red1
function onTouched(part)
print("Касание красного маркера (Signal1)")
if Manual.Value == false then
print("Не в ручном управлении (Signal1)")
print(part.Name)
if part.Name == "SignalPart" then
print("Красный включен (Signal1)")
Red.BrickColor = BrickColor.Red()
Green.BrickColor = BrickColor.new("Black")
Signal1.Value = BrickColor.new("Really red")
Signal2.Value = BrickColor.new("Black")
DeletePart.Script.Enabled = true
GreenSignallerMenu.BackgroundColor3 = Color3.fromHSV(0, 0, 0)
RedSignallerMenu.BackgroundColor3 = Color3.fromHSV(0, 0.886275, 1)
end
end
end
script.Parent.Touched:connect(onTouched)
I want to make these two script lines change color instantly. Can anyone tell me how to do this?
GreenSignallerMenu.BackgroundColor3 = Color3.fromHSV(0, 0, 0)
RedSignallerMenu.BackgroundColor3 = Color3.fromHSV(0, 0.886275, 1)