Im trying to make a tool that when clicked on another player, will make a bunch of textlabel appear on their screen(like advertisements), I know how to make the text labels appear, but I cant figure out how to make them appear on the target player
1 Like
I recommend using the players mouse, tool.Activated, and a remote event. Also, this would be easier if I could see the script.
1 Like
You can use mouse.target
to get the part/model the mouse is hovering over, so i would do something like this…
local mouse = game.Players.LocalPlayer:GetMouse()
mouse.Button1Down:Connect(function()
if mouse.Target:FindFirstChild('Humanoid') or mouse.Target:FindFirstAncestorWhichIsA('Model'):FindFirstChild('Humanoid') then
--Display label
end
end)
Use mouse.target
like people have already said here. Determine if the target is actually a player using Players
service :GetPlayerFromCharacter()
. If they are you can send their UserId
through a RemoteEvent to the server where the server will then fire a RemoteEvent on the client for that specific user. When that event is fired it shows the text labels.