Pretty self explanatory, let’s say I set a variable using :FindFirstChild().
Here is my example:
local Bullet = workspace:FindFirstChild(“Bullet”)
If I do this and I address the Bullet, is it using :FindFirstChild() each time? I understand when using RunService using :FindFirstChild() and :WaitForChild() is incredibly inefficient.
Full example:
local Bullet = workspace:FindFirstChild(“Bullet”)
game:GetService(“RunService”):Connect(function()
if Bullet then
– Do something
end
end)
Would doing if Bullet then be considered inefficient? Or is :FindFirstChild() only called once?
Yes, but my question is essentially, if I call “Bullet” in a function, would that be calling :FindFirstChild() each time “Bullet” is mentioned? Or is it only called once, when it is initialized?