Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to make a GUI Appear when mouse hovers over a Character?

Hey, I'm Elijah and I need some help.

So there's a current BOOTCAMP In Roblox that I'm trying to recreate. It has a script in it that makes it so when you hover your mouse over a Character it shows a GUI That says their rank in groups. I want it to be able to show every group so example,

Let's say it was like this 1970's Navy - Cheif of Naval Operations 1970's Military - Joint Chief of Staff 1970's NETC Naval Education and Training Command - Naval Staff


Or like this, https://i.imgur.com/8atR93u.png

1 comment

0

click detector in torso so you can detect hover

2 answers

You should use make it so that when a player spawns in, it instances a ClickDetector in the torso. Then after that script, use functions.

Try doing the script first and then someone might actually help you for real.

Might be a bit late, but you can use this script to toggle a frame being visible when you're hovering over a character.

Put this script inside of a frame to have it toggle when hovering over a character. Please note this will also work if hovering over an npc, if you don't want that you can uncomment the comment on line 9

local rs = game:GetService("RunService")
local plr = game.Players.LocalPlayer
local mouse = plr:GetMouse()

local frame = script.Parent -- this is assuming the script is inside of the gui you want to toggle

rs.RenderStepped:connect(function()
	local t = mouse.Target
	frame.Visible = t and t.Parent:FindFirstChild("Humanoid") -- and game.Players:GetPlayerFromCharacter(t.Parent)
end

This discussion is preserved as it was. New answers, comments, and votes are closed.