How can I make the following example work?
local myVariable = potato local PotatoWS = game.Workspace:findfirstchild(myVariable)
How can I make the following example work?
local myVariable = potato local PotatoWS = game.Workspace:findfirstchild(myVariable)
I think it's like this,
local myVariable = "potato" -- In quotes so u get no errors
local PotatoWS = game.Workspace:FindFirstChild(myVariable.Name) -- this could be myVariable and also do FindFirstChild is captilized
There is no .Name needed after myVariable, apart from that it is correct.
local myVariable = "potato"
local PotatoWS = game.Workspace:FindFirstChild(myVariable)
Please accept this answer if it worked!
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
Just put the word potato in quotes like this, "potato", and change :findfirstchild to :FindFirstChild.