Help with StringValue Object

Hi, I have a StringValue Object and I’m checking the value of this StringValue without adding any Value, meaning I want to leave it empty and check if it’s empty. I tried checking if it’s nil by calling it’s property called Value. However, it tells me that I am attempting to index nil with “Value”.

I got tired of this issue so I added a placeholder value called “Peepo,” and my code works perfect now. But I just wanna know what issue I am encountering here for a reference in the future. Thank you for the help in advance!

Not tested, but if it works, since there’s no value in the stringvalue, it should print. Output should just be: value is this:

if PathToStringValue.Value == "" then
print("value is this: " .. stringvalue.Value)
end

Why don’t you send the scripts you tried and have right now once you created topic for scripting support?

empty quotes, empty value

""

This is what I did before, and it didn’t work. Now I tested it again and it works… im so done

Make sure there are no spaces in the quotes.