Hello, I created a script that tries to change the text on a Billboard GUI that is used as the Roleplay Name, currently the text just says “Label” instead of the players username, additionally when trying to use the button to confirm a new Roleplay Name nothing happens. Any help on how to fix this? I’ve attached images of my naming conventions and code below.
Script that clones the BillboardGUI:
local NametagEvent = game:GetService(“ReplicatedStorage”).NameTag
local Nametag = game.ServerStorage:WaitForChild(“RoleName”)
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(Char)
local TagClone = Nametag:Clone()
if Char:FindFirstChild(“Head”) then
TagClone.Parent = Char.Head
end
end)
end)
NametagEvent.OnServerEvent:Connect(function(plr,Text)
print(plr,“wrote”,Text)
plr.Character.Head.TextName.TextLabel.Text = Text
end)
Script for the TextBox of the GUI:
script.Parent.MouseButton1Click:Connect(function()
local Text = script.Parent.NameInput.Text
game:GetService(“ReplicatedStorage”).NameTag:FireServer(Text)
end)