Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Still getting an infinit yield?!?!? PLEASE READ ALL

PLEASE READ ALL. Ok so, I went and tested my game on sever and it came up with this error: Objects is not a valid member of ServerStorage. So then I added

 Objects = game:GetService("ServerStorage"):WaitForChild("Objects")

And then it came up with an infinit yield... So to make sure that Objects actually existed and wasn't getting deleted by a certain script, I did:

for i,v in pairs(game:GetService("ServerStorage"):GetChildren()) do 
	print(v) 
end

That showed me that there was infact the folder called Objects in ServerStorage. Can someone please tell me why it is giving me an infinit yield? The script is a Local Script.

1 comment

0

Edited cause script enclosure was messed up

1 answer

✓ Accepted answer

###The ServerStorage class is server-side only. For client storage, use ReplicatedStorage. To answer your question, you get this warning because "infinite yield possible". "Possible". Not it did yield. A yield in scripting is a script pausing. If it does not find WaitForChild("Objects"), it will yield, and possibly break your script if yielding too long and the second argument wasn’t provided.

2 comments

0

I know what an infinit yield is.. I just didn't know serverstorage couldn't be accessed by clients but I guess that's why it's called server storage :)

0

Yes.

This discussion is preserved as it was. New answers, comments, and votes are closed.