How to find if an element is a StringValue?

I’m trying to solve an error in my script and I’m trying to find out if my string value is still a string value and anyways, what I’m trying to say is that is there a way to find out if an element, or object (whatever you want to call them), can be confirmed as a specific Class (like Enum or sum).

You could use the type() function in this way:

if type(YourString) == "string" then
print("This is a string!")
end

A link to the docs to help you out:

local instance = script.Parent

if instance:IsA("StringValue") then
	print("Instance is a StringValue.")
end

image

I believe this is what you’re referring to.

You see I’m trying to find if it is a string value not a string.