Log in to vote
0

Why is my Script Isn't showing my icon above me head?[CLOSED]

Asked by 7 years ago

this don't show my icon i made over my head

-- Made by Hyper_Tech

game.Players.PlayerAdded:connect(onPlayerRespawned)
function onPlayerRespawned(newPlayer)
    wait(1)
    if newPlayer ==("littledamian55") then 
        gui=Instance.new("BillboardGui")
        gui.Parent=newPlayer.Character.Head
        gui.Adornee=newPlayer.Character.Head
        gui.Size=UDim2.new(3,0,2,0)
        gui.StudsOffset=Vector3.new(0,2,0)
        text=Instance.new("ImageLabel")
        text.Image = "http://www.roblox.com/asset/?id=156411593" 
        text.Size=UDim2.new(1.25,0,1.25,0)
        text.Position=UDim2.new(-0.125,0,-0.25,0)
        text.BackgroundTransparency = 1
        text.Parent=gui
        w = game.Lighting.WepsGroup:GetChildren() 
        for i = 1,#w do
            w[i]:Clone().Parent = newPlayer.Backpack
        end
    end
end

function onPlayerEntered(newPlayer)
    newPlayer.Changed:connect(function (property)
        if (property == "Character") then
            onPlayerRespawned(newPlayer)
        end
    end)
end

game.Players.PlayerAdded:connect(onPlayerEntered)

3 answers

Log in to vote
0
Answered by
Mauvn 100
7 years ago

Because the background transparency is 1 witch means its invisible try 0.5, 0.6 etc....

Tell me if it works

0
ok littledamian55 0 — 7y
0
it dont wonk littledamian55 0 — 7y
Ad
Log in to vote
0
Answered by 7 years ago

You are defining the "onPlayerRespawned" function AFTER the connection. That means that on line 1 it's not set to anything, so it will error when you try to use it on connect(). You should actually just remove the entire line 3 - it wouldn't do anything except break even if you did define the function as I said above.

On line 6, you want to use if newPlayer.Name == "littledamian55" then

0
still not working littledamian55 0 — 7y
0
What does the output say? RenderSettings 35 — 7y
0
where is that littledamian55 0 — 7y
Log in to vote
0
Answered by 7 years ago

Well their is a few reasons this dosent work. First reason is because transparency is 1 try 0.6 or lower. And you are trying to put weapons in with the same billboard gui script. Instead try a Group rank billboard GUI. Try this script and put it in Workspace.

local group = 0000  ---- Put the group ID here.
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)

if player:IsInGroup(group) then
local gui = Instance.new("BillboardGui", character.Head)
gui.Adornee = gui.Parent
local text = Instance.new("TextLabel", gui)
text.Size = UDim2.new(0.5, 0, 0.05)
gui.StudsOffSet = Vector3.new(0, 4, 0)
text.BackgroundColor3 = Color3.new(0/255, 0/255, 0/255)
text.TextColor3 = Color3.new(255/255, 255/255, 255/255)
text.Font = "SourceSansBold"
text.FontSize = "Size18"
text.Text = player.Name..": "..player:GetRoleInGroup(group)..""
end
end)
end)


----GoodkidMad

This should work.

0
i dont have a group. littledamian55 0 — 7y
0
what do you mean "Put weapon in the same billboard GUI." littledamian55 0 — 7y
0
Ok then your problem is (onPlayerRespawned) and try removeing your WepsGroups as well from your script and then test it. GoodkidMad 14 — 7y

Answer this question