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

screen gui doesnt change billboard text. WHY???

local BillboardGui = game:GetService('ReplicatedStorage'):WaitForChild('BillboardGui')
local text = script.Parent.Parent.TextBox.Text
script.Parent.MouseButton1Click:connect(function()
    BillboardGui.frame.TextBox.Text = text
    print ("text changed")
end)

don't know if this helps this is to get it into players head

local BillboardGui = game:GetService('ReplicatedStorage'):WaitForChild('BillboardGui') --You may have also made a spelling mistake here.

game.Players.PlayerAdded:Connect(function(plr)
    plr.CharacterAdded:Connect(function(char) --Fires everytime the player respawns
        char:WaitForChild('Head')
        local clonedBillBoard = BillboardGui:Clone()
        clonedBillBoard.Parent = char.Head
		clonedBillBoard.frame.RPText.Text = plr.Name
    end)
end)

2 comments

0

Are both of the GUI's inside 1 player at the same time? If so you may need to use a string value inside Replicated Storage for them to change. I could be wrong though.

0

mate your so right

2 answers

Well you can't actually go into replicated storage and change the billboard GUI text expecting it to change all of the billboard GUI's underneath the players. It will change that specific GUI so that when it opens again it will display that text, but if a player already has it open it will stay the same. Instead, you need to go into the player manually and change the text there, not in replicated storage.

3 comments

0

how you do that

0

As Cmg said, you’re changing the way the REFERENCE billboardgui looks. But not the billboardguis that already exist. When you clone an object, it’s no longer related to the object you cloned it from unless you specifically code it to be. So changing the original object has no effect on the clones.

0

oh

Posted my other comment as a reply by accident, whoops.

I assume you are trying to change the billboardgui in your character when you press a button on screen. The way you do that is, in your script with the button, on the line where you are changing the text, use:

game.Players.LocalPlayer.Character.Head.BillboardGui.frame.RPText.Text = script.Parent.Parent.TextBox.Text

This finds the billboardgui specifically in YOUR character model and resets the text to whatever is currently in the TextBox (your variable ‘text’ only captures what’s in the TextBox when the script is first activated, meaning if you change the text in it and press the button, it will keep using the same text every time.)

1 comment

0

still doesnt work it says Infinite yield possible on 'Players.EpicAshtonTheBoy:WaitForChild("BillboardGui")'

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