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

Grab is not valid member of backpack, how do i fix it?

Asked by 4 years ago
Edited 4 years ago

Hey there, this script is for arrest system. However, when i click on it it says "Grab is not valid member of backpack" how do i fix it?

script.Parent.ClickDetector.MouseClick:Connect(function(Player)
    local PlayerGui = Player:WaitForChild("PlayerGui")
    local Suspect = game.Players:FindFirstChild(Player.Backpack.Grab.Suspect.Value)
    if Suspect then
        local Gui = game.ServerStorage.NYPDBookPlayer:Clone()
        Gui.Parent = Player
        Gui.Suspect.Value = Suspect
    end
end)

Grab is an tool by the way.

0
is any instance named 'Grab' in the Player's backpack FurryPapal 90 — 4y
0
is 'Suspect' a string value (also please reply on the comments) FurryPapal 90 — 4y
0
Yes,there is suspect value inside grab tool. Pancio10_alt 4 — 4y
0
Ok, but is it a string value, because when game.Players finds an instance named (Suspect.Value) it needs to be a string value (at least that i know of) FurryPapal 90 — 4y
View all comments (4 more)
0
It is an string value. Pancio10_alt 4 — 4y
0
Tools are parented to the player's character when they are equipped and are parented to the Backpack when they are unequipped. If the Grab tool is equipped, then it isn't in the backpack. SteelMettle1 394 — 4y
0
Again, what Steel said, whenever you equip a tool, it moves to your character, therefore not in your backpack <--- Basically a much simpler version of saying it fcvrs 22 — 4y
0
But it is not equipped and still not working Pancio10_alt 4 — 4y

Answer this question