Ok, this code is simple, but it doesn’t work.
I checked everything : the path, the value, the code but it doesn’t change the text, here it is :
local text = script.Parent
local val = script.Parent.Parent.Parent.Parent.Handle.On
local value = script.Parent.Parent.Parent.Parent.Handle.On.Value
val.Changed:Connect(function()
if value == 0 then
text.Text = "Ready"
text.TextColor3 = Color3.new(0, 122, 0)
elseif value >= 1 then
text.Text = value
text.TextColor3 = Color3.new(122,0,0)
end
end)
local text = script.Parent
local val = script.Parent.Parent.Parent.Parent.Handle.On
val.Changed:Connect(function()
if val.Value == 0 then
text.Text = "Ready"
text.TextColor3 = Color3.new(0, 122, 0)
elseif val.Value >= 1 then
text.Text = val.Value
text.TextColor3 = Color3.new(122,0,0)
end
end)
The main reason why it’s not changing I believe is because you only defined the value variable once, so it’ll only keep changing to that 1 String
local text = script.Parent
local val = script.Parent.Parent.Parent.Parent.Handle.On
val.Changed:Connect(function()
if val.Value == 0 then
print("Is ready")
text.Text = "Ready"
text.TextColor3 = Color3.fromRGB(0, 122, 0)
elseif val.Value >= 1 then
print("Is not ready")
text.Text = val.Value
text.TextColor3 = Color3.fromRGB(122,0,0)
else
print("What")
end
end)
I did also go ahead and change your Color3.new to Color3.fromRGB, since Color3.new only takes number values that go up to 1, then afterwards it’s neon pain