Help making a name tag

  1. What do you want to achieve?
    I want to make a mouse hover that show enemy’s tag using tween service transparency

  2. What is the issue?
    Idk how to locate my textlabel billboard gui in startercharacter

  3. What solutions have you tried so far?
    game.Players.LocalPlayer.Character:Waitforchild (“Billboard”).transparency

local label = game.Players.LocalPlayer.Character:Waitforchild (“Billboard”)
local player = game.players.localplayer
local mouse = player:GetMouse()
local tweenService = game:GetService("TweenService")

Function updatepos()
         local target = mouse.target
         if target and target:findfirstchild(“mouseovertext ”) then
        local tweenInfo = TweenInfo.new(
        1, --Time
         Enum.EasingStyle.Linear, --EasingStyle
         Enum.EasingDirection.Out,  —EasingDirection
          0, --Repeat count
          false, --Reverses if true
          0 --Delay time
)
local tween = tweenService:Create(label, tweenInfo, {Transparency = 0})
tween:Play()
         else
         local tweenInfo = TweenInfo.new(
        1, --Time
         Enum.EasingStyle.Linear, --EasingStyle
         Enum.EasingDirection.Out,  —EasingDirection
          0, --Repeat count
          false, --Reverses if true
          0 --Delay time
)
local tween = tweenService:Create(label, tweenInfo, {Transparency = 1})
tween:Play()
     end
end

mouse.move:Connect(updatePos)

updatePos()

—I know there is a lot of error,spelling,etc and this script is crooked bc I’m “planning ”to make it and I’m in mobile phone typing all of the script.the tween line I took from dev forum bc it’s easier

I use this for my template How To Make MOUSEOVER TEXT! Roblox - YouTube

Can’t you just run the game and go check where you put it?

Here this is same as me How To Make MOUSEOVER TEXT! Roblox - YouTube

if you did exactly what the video told you to do then the script is inside of the label itself, meaning you can find it using “script.Parent”

I’ll explain I make the same thing like that dude do but I change it to tween service and i change script.parent to textlabel billboardgui parented by startercharacter

OOOOH!! that makes way more sense
okay, don’t parent it to the startercharacter, parent it to startercharacterscripts inside of startercharacter

If you do that then it’ll actually spawn inside the character, there’s some setting in Billboardguis that allows you to make the label appear inside a part without actually putting the gui inside of that part, but I forgot the name, alternatively you can parent it to the HumanoidRootPart via script or something

1 Like

Bilboardgui’s do not use Transparency as a value, they simply just hold Guibase2ds in a 3D screen.

If you want to change the transparency, you have to change the label itself, not the bilboardgui

oh yeah, and do this too

Yeah like i just said there is a lot of error in that script

so the solution to get you textlabel is first, move that bilboardgui in startercharacterscripts instead of starterplayer, then use this

local bilboard = character:FindFirstChild("BilBoardGui")
local label = bilboard:FindFirstChild("TextLabel")-- this is it

just an fyi, the names may not match yours, especially if you have a custom name for your instances
If this is the case, just simply change the names of the instances

1 Like