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

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

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

2 comments

0

Your trying to access a child if tool that doesnt exist

0

It do

1 answer

✓ Accepted answer

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")

1 comment

0

Thank you it work

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