(PROBLEM SOLVED BY @bhristt | Accidentally had a space in one of the TextLabels)
Hello,
I’ve come across something strange that I don’t have any solution for. I’ve looked but haven’t found anything related to it (maybe I just didn’t use the right terms in the search?).
The script itself is pretty self explanatory: whenever the StringValue (“OpenValue”)'s value changes, it should check whether the value is “PerformanceTab” or not. However, after updating it the first time, it consistently shoots out the same message (either “Correct tab” or “Different tab”), despite it being different.
I’ve made absolute sure that when I look at the value in Studio it changes.
I’m really quite stumped. Any help would be greatly appreciated!
local OpenValue = script.Parent.Parent.OpenValue
OpenValue.Changed:Connect(function()
if OpenValue.Value == "PerformanceTab" then
print("Correct tab")
elseif OpenValue.Value ~= "PerformanceTab" then
print("Different tab")
end
end)
local OpenValue = script.Parent.Parent.OpenValue
OpenValue.Changed:Connect(function(val)
if val == "PerformanceTab" then
print("Correct tab")
elseif val ~= "PerformanceTab" then
print("Different tab")
end
end)