Security Scanner

Could you send a screenshot of the error?

Ah, I got it, my bad, I missed a word.

local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()

local tool = script.Parent

local Frame = game.Players.LocalPlayer.PlayerGui:WaitForChild('ScreenGui'):WaitForChild('Frame') --Object path to the GUI frame containing the age and rank textboxes.
local groupID = 4796549 --ID of your group.

tool.Activated:Connect(function()
	for _,Target in pairs(game.Players:GetPlayers()) do
		if Mouse.Target:IsDescendantOf(Target.Character) then
			Frame.Visible = true
			Frame.AccAge.Text = Target.AccountAge
			Frame.RoleInGroup.Text = Target:GetRolesInGroup(groupID)
		end
	end
end)

Mouse.Button1Up:Connect(function()
	Frame.Visible = false
end)

-- Make sure they can't use the tool while it is not selected.
tool.Unequipped:Connect(function()
	Frame.Visible = false
end)

Still doesn’t work. Thanks though.

Any errors?
Try adding so print functions around the code, to help you figure out where it breaks.

Same error as before. Sorry I didn’t mention that.

I just updated the last script I sent, try that again.
Can you send a picture of your StarterGui hierarchy?

Do you mind adding some print functions for me? I don’t know exactly where to put them.

Just add some before and after every statement

WE MADE PROGRESS!!! Alright, so, there is an error on line 15. FYI: whenever I click my alt account, the frame pops up for like a millisecond then goes away. Let me send you a screen shot of the error.

I believe that the frame disappears because I made it so you have to hold the mouse key

Can you make it so you click the player, then you wait for five seconds, then it disappears?

Sure thing, simply remove the

Mouse.Button1Up:Connect(function()
	Frame.Visible = false
end)

and change the first part to

tool.Activated:Connect(function()
	for _,Target in pairs(game.Players:GetPlayers()) do
		if Mouse.Target:IsDescendantOf(Target.Character) then
			Frame.Visible = true
			Frame.AccAge.Text = Target.AccountAge
			Frame.RoleInGroup.Text = Target:GetRolesInGroup(groupID)

			wait(5)

			Frame.Visible = false
		end
	end
end)

That is the next error. The account age works but the Get roles in group makes that error.

Change

Target:GetRolesInGroup(groupID)

to

Target:GetRoleInGroup(groupID)

Dude thank you so much! If you have time can you help me with another thing?

Its with the security scanner not something else.

Sure thing, what is it you need help with?

So I also want it to show the name of the player and the tools in the players backpack. How do I do that?