Hello, I am making a language setting button, apparently, it does update the NumberValue, but for my street code, it does not work and update.
Code;
local plr = game.Players.LocalPlayer
local Language = plr:WaitForChild("PlayerGui"):WaitForChild("MenuGui"):WaitForChild("Settings"):WaitForChild("Language"):WaitForChild("LanguageBool")
local function run()
if Language.Value == 0 then
for i,v in pairs(script.Parent:GetDescendants()) do
if (v.ClassName == tostring("TextLabel")) then
v.Text = "Bike Lane"
end
end
elseif Language.Value == 1 then
for i,v in pairs(script.Parent:GetDescendants()) do
if (v.ClassName == tostring("TextLabel")) then
v.Text = "Piste Cyclable"
end
end
end
end
run()
Language.Changed:Connect(run)local plr = game.Players.LocalPlayer
local Language = plr:WaitForChild("PlayerGui"):WaitForChild("MenuGui"):WaitForChild("Settings"):WaitForChild("Language"):WaitForChild("LanguageBool")
local function run()
if Language.Value == 0 then
for i,v in pairs(script.Parent:GetDescendants()) do
if (v.ClassName == tostring("TextLabel")) then
v.Text = "Bike Lane"
end
end
elseif Language.Value == 1 then
for i,v in pairs(script.Parent:GetDescendants()) do
if (v.ClassName == tostring("TextLabel")) then
v.Text = "Piste Cyclable"
end
end
end
end
run()
Language.Changed:Connect(run)
Explorer;
I have tried re writing the code, and much more debugs.
Final note;
I put debug statements, like print("LINE TEST ONE")
, and it did not print.
Any ideas?