local spawns = gui.Frame.ItemName.Text 
local spawned = game.Workspace.Spawn:GetChildren()

What I want to do is make it so if the text is the same as the model in spawned it sets a variable for it.

For example. the Text says Stick and in Spawn it finds stick.

I want a variable set for that so x=game.Workspace.Spawn.Stick.. Hopefully, that makes sense.

2 comments

0

Kinda confused on what you're wanting. If you're trying to find something in Workspace based on the Text in the TextLabel, then it would be something like local x = workspace:FindFirstChild(gui.Frame.ItemName.Text)

0

local x = game.Workspace:FindFirstChild(script.Parent.gui.Frame.ItemName.Text) or local x = game.Workspace:FindFirstChild(script.gui.Frame.ItemName.Text)