Is it possible to reference an object with a string?

I’m trying to reference a part in a script but, instead of referencing it by typing in its name normally, I need to use a string value. Here is an example of what I mean:

local stringval = Instance.new("StringValue")
stringval.Value = "Part"
local part = game.Workspace.stringval.Value

Since I have the name of the object stored in a string value, and cannot manually change it in the script, how would I do this?

replace line 3 with

local part = game.workspace:FindFirstChild(stringval)

Yes it is. There are a couple of ways you can do this. I’ll just put some down below.

local PART_NAME = "Part"
workspace[PART_NAME]
workspace:FindFirstChild(PART_NAME)
workspace:WaitForChild(PART_NAME)

(Make sure you get the value out of the object too)