I don't know this but I found a code written in 2018 that could help you. I didn't write this
local Player = game:GetService("Players").LocalPlayer;
local Mouse = Player:GetMouse();
local UIS = game:GetService("UserInputService");
local RS = game:GetService("RunService");
local Gui = Instance.new("ScreenGui", Player:WaitForChild("PlayerGui"));
local Label = Instance.new("TextLabel", Gui);
Label.Size = UDim2.new(0, 100, 0, 10);
Label.AnchorPoint = Vector2.new(0.5, 0.5);
RS:BindToRenderStep("MouseHover", Enum.RenderPriority.Camera.Value - 1, function()
local mPos = UIS:GetMouseLocation();
Label.Position = UDim2.new(0, mPos.X, 0, mPos.Y);
local Target = Mouse.Target;
if Target then
if Target.Parent then
if Target.Parent:IsA("Model") and not (Target.Parent == workspace) then
local tPlayer = game:GetService("Players"):GetPlayerFromCharacter(Target.Parent);
if tPlayer then
Label.Text = tPlayer.Name;
else
Label.Text = "Model: " .. Target.Parent.Name;
end;
else
Label.Text = "Object: " .. Target.Name;
end;
else
Label.Text = "Object: " .. Target.Name;
end;
else
Label.Text = "nil";
end;
end);
1 comment
Sorry dude, hate to crash your party, but this is not a request site. We require that you please make an attempt and then come here for help. No code, no service.