The script is in Starter GUI > Screen GUI > Script. Text Label is also in Starter GUI > Screen GUI
Here's the script within the UI:
local RunService = game:GetService("RunService") local Player = game:GetService("Players").LocalPlayer -- Get the player local Mouse = Player:GetMouse() -- Get the player's mouse -- Just creating a name tag for this example. This is assuming the script is inside a ScreenGui that's in the PlayerGui. local Tag = Instance.new("TextLabel",script.Parent) Tag.Text = "" Tag.Visible = false Tag.TextColor3 = Color3.new(0,204,204) Tag.Font = "ArialBold" Tag.FontSize = "Size18" Tag.BackgroundColor3 = Color3.new(0,0,75) Tag.BackgroundTransparency = 0 Tag.TextXAlignment = "Left" -- Using the RenderStepped event of RunService, which updates at roughly 1/60th of a second (about twice as fast as the generic wait function, obviously this should still be in a local script) RunService.RenderStepped:connect(function() local Target = Mouse.Target -- Get the object the mouse is hovering over if Target then -- Make sure the target exists -- Update the information when a target exists Tag.Text = Target.Name Tag.Size = UDim2.new(0,Tag.TextBounds.X,0,20) -- TextBounds.X will make the tag be as long as the text, giving it a more complimenting appearance Tag.Visible = true -- If no target exists, then... else -- Hide the tag Tag.Visible = false end -- Update the tag's position with the mouse Tag.Position = UDim2.new(0,Mouse.X-Tag.AbsoluteSize.X,0,Mouse.Y-Tag.AbsoluteSize.Y) end)