"Halo Boost" is not a valid member of folder "boosts"

I’m working on a game, and it has boosts. My code is correct however I get this error;
image
Even though it’s there…
image
Here’s the script;
image
Is there any way to prevent this? and if so, how?

You’re gonna have to show us the code you have in that HaloEquip script

Edited it to have the script in there too.

Try changing line 8 to

plr.boosts:WaitForChild("HaloBoost") = mod.Halos[haloName]:WaitForChild("Power Boost")

Nope, just tried using :WaitForChild() and also this
image

Still gives the same error.

What are you even trying to do? plr.boosts is a folder. And instances are not dictionaries. A child of an instance or its property can be referenced the same way as a value with a string key in a dictionary. However, you can only set a value of a property in an instance that way, and folders do not have a property called “Halo boost”.

That’s quite odd it looks like it should work with the WaitForChild. Even with that it still prints that it errors?

Also now that I looked at the code well, what are you even doing in that line? You’re somehow trying to change an instance with another instance? That doesn’t seem possible like that

No, I’m changing an instance with a value from a dictionary.

I am aware that instances are not dictionaries. That is not what I have tried to do.

You can’t really do that, you can only change a property of the Halo Boost to be something from a dictionary, you can’t change an instance using a dictionary value

That still does not explain this error if that is true or not.

Is the RemoteEvent being called immediately after the player joins the server? Looking through, WaitForChild should’ve worked, so I’m not sure what’s going on exactly

Edit: Are you sure it gave the same error taht Halo Boost doesn’t exist even with the WaitForChild?

I’m not sure what you are trying to do, but if mod.Halos[haloName]["Power Boost"] is an instance, then maybe you should replace line eight with

mod.Halos[haloName]["Power Boost"]:Clone().Parent = plr.Boosts

Nope it’s not.

Positive. It’s weird.

That’s odd… I never saw that happen before, I’m not sure what else could be done

You need to type .Value so plr.boosts[“Halo Boost”].Value = mod.Halos[haloName][“Power Boost”]
Also, ofc make sure that you have a server script that is putting the “boosts” folder into the player

That still doesn’t work since Halo Boost is not being found by the script, it’ll still error

Did you try doing .Value or are you just saying that it wont fix it because I have had errors like this aswell and I realized its because I didn’t type .Value

If you are trying to directly set instance[childName] = child, you get the same error that you get when you write local child = instance[childname] and a child with that name does not exist. Even if it existed, trying to set it will cause this error.

If you want to add a child to an instance, you’ll need to set the parent property of the child to be the parent instance. You can not add a child to the instance the way you are trying to, if that’s even what you are trying to do.

Edit: I didn’t notice that “Halo boost” was a value instance. You should do what @AccessQ suggested.

The error is saying that Halo Boost is not a valid member of the boosts folder, it’s not cause of .Value because that would return another error, this is an error that happens when somethign is not found in a folder