In the script below I need to check for the other persons rank. I have a hover over GUI that shows one person the others rank. Here is the code:
local player = game:GetService("Players").LocalPlayer
local mouse = player:GetMouse()
mouse.Move:Connect(function()
script.Parent.Position = UDim2.new(0, mouse.X + 10, 0, mouse.Y + 5)
script.Parent.Visible = false
local target = mouse.Target
if target and target.Parent then
if target.Parent:FindFirstChild("HumanoidRootPart") then
script.Parent.Text = target.Parent.Name
script.Parent.Visible = true
end
if target:FindFirstChild("Mouseover") then
script.Parent.Text = target.Mouseover.Value
script.Parent.Visible = true
end
end
end)
It would be very helpful to be told what I should do to show the persons group rank.

3 comments
No, the mouse is better here. UserInputService cannot detect the movement of the mouse cursor.
^ UIS can detect mouse movement through UIS.InputChanged.
This is very helpful, the only problem with it is that there are multiple groups that I want to check for their group rank. This code to me looks like I can only get the group rank in one group instead of all the groups.