Name of the player is simple, you can get that by doing
Target.Name
The tools on the other hand, depends on how you want to show the tools.
Do you just want to show a list of the tool names?
Name of the player is simple, you can get that by doing
Target.Name
The tools on the other hand, depends on how you want to show the tools.
Do you just want to show a list of the tool names?
Also, there is an error with line 15 (the account name). It says this - attempt to index string with text.
Hello??? Are you there???
--MouseButton1DownEvent
local ray = Ray.new(tool.Handle.Position,(Mouse.Hit.Position - tool.Handle.Position).unit * 500)--500 is your max distance that the ray can reach
local part,pos = workspace:FindPartOnRayWithIgnoreList(ray,tool:GetChildren(),false,false)
if part then
if part.Parent:FindFirstChild("Humanoid") then
--Add a line that checks if its a player then if it is then do you're thing
There is no need at all to use RayCasting, detecting the player was already done.
Add this to your script:
local text = ""
for _, tool in ipairs(Target.Backpack:GetChildren()) do
text = text..(tool.Name)..", "
end
Frame.ToolList.Text = text