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

Now i am making another game called strength simulator but i can't fix this error can you help me?

Asked by 4 years ago
Edited 4 years ago

Here the script where the error is :

local player = game.Players.LocalPlayer

script.Parent.MouseButton1Click:Connect(function(click)
    if player.leaderstats.Money.Value >= 10 then
        player.leaderstats.Money.Value = player.leaderstats.Money.Value - 10

        game.ReplicatedStorage.Tools.BlueWeigth = player:WaitForChild("Backpack")
    end
end)

The error line is the 7 and the error is : 18:16:50.618 - BlueWeigth is not a valid member of Folder

0
Your trying to access a child if tool that doesnt exist JesseSong 3916 — 4y
0
It do Clxud_D 9 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

The object "BlueWeigth" is not a valid member of folder. Your error really describes the problem itself.

There is no item in this folder you're referencing called "BlueWeigth"

Check to see if you misspelled the name of the item you are trying to reference.

So, here is your fix. I also added a .Parent, because I assume you're trying to put that tool in the player's backpack.

game.ReplicatedStorage.Tools.NameOfToolYouAreTryingToReference.Parent = player:WaitForChild("Backpack")
0
Thank you it work Clxud_D 9 — 4y
Ad

Answer this question