Hello, this script was made for arrest system, however when I am clicking on it nothing happens and console says "Attempt to index nil with PlayerGui" This is the script:
script.Parent.ClickDetector.MouseClick:Connect(function(plr)
local Gui = game.ServerStorage.NYPDBookPlayer:Clone()
Gui.Parent = Player.PlayerGui
Gui.Suspect.Value = game.Players:FindFirstChild(Player.Backpack.Grab.Suspect.Value)
end)

4 comments
Thanks
Now it says grab isnt valid member of backpack while i have it in my inventory
Again, use :WaitForChild() on Backpack. (Backpack = Player:WaitForChild("Backpack"))
Where do i put it? I am new at scripting