Inventory check tool

hi i need a script for a tool thath if the player with the tool clicks on another player the first player can see the other player inventory in a GUI thx to anyone who does it :pray:

local Player = game:GetService('Players').LocalPlayer
local Mouse = Player:GetMouse()
local Tool = script.Parent

Tool.Activated:Connect(function()
	local Hit = Mouse.Target
	if Hit.Parent:FindFirstChildOfClass('Humanoid') then
		local Player = game:GetService('Players'):GetPlayerFromCharacter(Hit.Parent)
		print(Player.Backpack:GetChildren())
	end
end)
1 Like

sorry it need to output the result in like a gui heht only works when the tool is equipped

All you have to do is use the above script, and alter it to fire a remote event of some sort containing the information to the client.

It’s that simple.

1 Like

oh ok thx i am not too good at coding

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.