Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Roblox Update broke my simple small portion of a script. Need a small bit of help?

Asked by 5 years ago
Edited 5 years ago

I'm sure you all people of the new roblox update, the one with the dramatic grey logo. Well, they not only updated the website but also the studio! Making prints look more nice and clean, and breaking tons of scripts when talking about server managing objects or values inside player.

Didn't realize it yet? Here's a small portion of my script, which is in workspace called datastore.

FE is on by the way.

Well our good friend "datastore" is going to save and load values in and out of our player, but whoops! Roblox update prevents you from doing that anymore. When in Client Mode, I can see a folder I made with a script called "PlayerEquipment" (Saves a bunch of critical values I need for the game to function correctly), but when entering Server Mode and go in the player in workspace, guess what? There's no "PlayerEquipment" folder! So the script, gives me an error when trying to look for it. This also applies to when looking into values inside the player through the server

Script:

--Code 
player.Character:WaitForChild("PlayerEquipment")
--Code

Output:

Infinite yield possible on 'Workspace.wilsonsilva007:WaitForChild("PlayerEquipment")'

I'm unsure if this is an issue that roblox will discuss or if it's going to be like this always even tho because the update is brand new. What was the point of this update anyways? Probably prevent exploiters hacking? At what cost? Breaking scripts and games freatures?

I cannot carry on coding while this is like this, or atleast, while I don't know how to save these values without getting an error.

Any ideas on how to fix this? What's your throughts? Do you think it's a good improvement to roblox anti-exploit?

Thanks for your times guys.

0
Infinite yield is just a warning that the script could wait forever if the thing it’s waiting for doesn’t load. You could just add a time to wait for said thing that once the time is up, the thing is nil and the script resumes ABK2017 406 — 5y
0
Although that’s probably a better solution for a part/model than a datastore... ABK2017 406 — 5y
0
I tried it out before, didn't work. As I said, I think the server now blocks all sorts of inserts into the player. Even in a local script. wilsonsilva007 373 — 5y

1 answer

Log in to vote
1
Answered by
green271 635 Moderation Voter
5 years ago

Warnings

By default, Roblox will warn you of some actions that you are doing. These will appear in orange text, it is identical to doing warn(text). This warning in paticular is nothing to worry about.

What it means

Infinite Yield Possible just means that your script can hang forever if the instance it's waiting for does not load/does not exist. That's why it's implied in the name, WaitForChild. This warning will appear by default unless you use the 2nd arguement of WaitForChild. The 2nd arguement is not required.

Folder not existing

The PlayerEquipment is not appearing for one of these two reasons:

  • No parent is set
  • You're parenting it in a LocalScript

FilteringEnabled is now always on, which means that any changes made in a LocalScript (the client) will not replicate to the server. That is why you do not see it.

0
So what do you suggest? Add them by the server when a player joins? wilsonsilva007 373 — 5y
0
The script worked just fine yesterday, before the roblox update. wilsonsilva007 373 — 5y
0
Nvm, just changed to a normal script. Idk what this change was but I hope it doesn't impact coding that much. wilsonsilva007 373 — 5y
Ad

Answer this question