Clicking on a Humanoid/Player to display an info GUI

Hi everyone, I’m trying to script a few things for my RP game, and I’ve decided that I want to implement a ‘Bio’ system that players fill out and display in a GUI.

I’m having trouble figuring out how to script the system so when you click on that player, it brings up their bio information that they entered. I also would like to have a hovering GUI that will say, for example: ‘Click here for (player’s name/RP name) bio.’

I already know how to filter the text and then place it into a StringValue, but I don’t know how to script the part where you click on the player and it brings up the GUI. Can someone please help me? Thanks.

P.S. If you need more clarification, then I’ll be happy to explain more.

1 Like

about the clicking on you basically want to use a click detection on the humanoid (or all the parts of the player) and then use

local ClickedPlayer = game.Players:GetPlayerFromCharacter(ClickDetector.Parent.Parent)

to obtain the player from it’s character.
from there you can basically look into the database (if you have one) by his userId. if you don’t use databases simply just go where the RP name and such is stored, for example in ServerStorage:

game:GetService("ServerStorage")[ClickedPlayer.UserId].RPName

the hovering is also a event on the ClickDetector see this post

for text filtering look here
if you need more information or don’t understand it do ask!

I’m not planning on using ClickDetectors, instead I want it so when you hover your mouse over a player and click them, then the GUI pops up.

You’d have to store the information of the player somewhere where it can replicate to the client

example (don’t actually use it i wrote just now on phone and it probably doesn’t work, also might not be performance friendly), you should probably make it a function that is used in a loop if the mouse parent is not the last.

This just makes it so it opens when you hover over them:
RunService.Heartbeat:Connect(function() if Mouse.Parent ~= nil and game.Players:FindFirstChild(Mouse.Parent.Name) then local infofolder = player:FindFirstChild(“InfoFolder”) if infofolder then opengui(infofolder) else closegui() end else closegui() end end)

this should answer your question i guess?

2 Likes