I made a script where it prints out the path of an object, however for some reason the classnames get printed out instead of just the names itself. any help? Code:
local Plr = game:GetService("Players").LocalPlayer
local Mouse = Plr:GetMouse()
local function answer(t)
if t == "Yes" then
print(Mouse.Target:GetFullName())
end
end
local reply = Instance.new("BindableFunction")
reply.OnInvoke = answer
Mouse.Button1Down:connect(function()
if not game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.LeftControl) then return end
if not Mouse.Target then return end
game.StarterGui:SetCore("SendNotification", {
Title = "Confirmation";
Text = "Print path of "..Mouse.Target.Name.."?";
Callback = reply;
Button1 = "Yes";
Button2 = "No";
})
end)
Example: A pathway of a bendy part head would be:
Workspace.Bendy.Head
But instead it returns as:
Workspace.Model.Part
