How do you make a while loop run as long as a part exists?

Very simple question hopefully, just curious as its not working for me.
This is an example of what I’ve tried:

while workspace:FindFirstChild("Part") do
        wait(.1)
        print("hi")
end
1 Like

It should work, why isn’t it working? Any errors?

1 Like

i have tested your exact code it works

2 Likes

Yeah nvm sorry I literally just typed the name of it wrong…

1 Like

Haha always check for typos man