Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why does my Billboard gui not appear?

Asked by 5 years ago
Edited 5 years ago

I have done it correctly it doesnt appear that I'm an owner of a game I did put everything correctly but the script is not doing what I wanted it to. This is my script:

local billboardgui = game:GetService("ServerStorage"):WaitForChild("BillBoardGui")
local clonedgui = billboardgui:Clone()

game.Players.PlayerAdded:Connect(function(player)

    player.CharacterAdded(function(char)

        if player.Name == "oliwier1232" then
        clonedgui.TextLabel.Text = "Game Creator"
        clonedgui.TextLabel.TextColor3 = Color3.fromRGB(36, 154, 165)
        clonedgui.Parent = game.Workspace:WaitForChild(player.Name).Head
        end

        if player.Name == "My friends name" then -- I did put my friends name on it didn't work
        clonedgui.TextLabel.Text = "Admin Helper"
        clonedgui.TextLabel.TextColor3 = Color3.fromRGB(38, 255, 23)
        clonedgui.Parent = game.Workspace:WaitForChild(player.Name).Head
        end

        if player.Name == "My friends name" then -- I did put my friends name it didn't work
        clonedgui.TextLabel.Text = "Admin Helper"
        clonedgui.TextLabel.TextColor3 = Color3.fromRGB(0, 12, 255)
        clonedgui.Parent = game.Workspace:WaitForChild(player.Name).Head
        end

        if player.Name == "my friends name" then -- I did put my friends name it didn't work
        clonedgui.TextLabel.Text = "Admin Helper"
        clonedgui.TextLabel.TextColor3 = Color3.fromRGB(28, 244, 255)
        clonedgui.Parent = game.Workspace:WaitForChild(player.Name).Head
        end

        if player.Name == "my friends name" then -- I did put my friends name it didn't work
        clonedgui.TextLabel.Text = "Admin Helper"
        clonedgui.TextLabel.TextColor3 = Color3.fromRGB(255, 140, 250)
        clonedgui.Parent = game.Workspace:WaitForChild(player.Name).Head
        end

    end)


end)

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

Sorry that my previous answer didn't work, let me try again.

On line 8 it says:

if player.Name == "my name" then

Replace "my name " with your username.

Next: make sure to insert a BillBoardGui into game.Serverstorage. Next put a TextLabel into that BIllBoardGui. It should look like this (https://gyazo.com/1effea7680f26b12df7ca00d9b14c1f6)

Now, replace your code with this code:

local billboardgui = game:GetService("ServerStorage"):WaitForChild("BillboardGui")
local clonedgui = billboardgui:Clone()

game.Players.PlayerAdded:Connect(function(player)
        if player.Name == "my name" then
        clonedgui.TextLabel.Text = "Game Creator"
        clonedgui.TextLabel.TextColor3 = Color3.fromRGB(36, 154, 165)
        clonedgui.Parent = game.Workspace:WaitForChild(player.Name).Head
        end

        if player.Name == "My friends name" then
        clonedgui.TextLabel.Text = "Admin Helper"
        clonedgui.TextLabel.TextColor3 = Color3.fromRGB(38, 255, 23)
        clonedgui.Parent = game.Workspace:WaitForChild(player.Name).Head
        end

        if player.Name == "My friends name" then
        clonedgui.TextLabel.Text = "Admin Helper"
        clonedgui.TextLabel.TextColor3 = Color3.fromRGB(0, 12, 255)
        clonedgui.Parent = game.Workspace:WaitForChild(player.Name).Head
        end

        if player.Name == "my friends name" then
        clonedgui.TextLabel.Text = "Admin Helper"
        clonedgui.TextLabel.TextColor3 = Color3.fromRGB(28, 244, 255)
        clonedgui.Parent = game.Workspace:WaitForChild(player.Name).Head
        end

        if player.Name == "my friends name" then
        clonedgui.TextLabel.Text = "Admin Helper"
        clonedgui.TextLabel.TextColor3 = Color3.fromRGB(255, 140, 250)
        clonedgui.Parent = game.Workspace:WaitForChild(player.Name).Head
        end

end)

It should work now.

Side note: If the GUI doesn't look like it should you can change that inside the ServerStorage.

Ad

Answer this question