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

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

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

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

Tell me if it works

2 comments

0

ok

0

it dont wonk

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

3 comments

0

still not working

0

What does the output say?

0

where is that

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.

3 comments

0

i dont have a group.

0

what do you mean "Put weapon in the same billboard GUI."

0

Ok then your problem is (onPlayerRespawned) and try removeing your WepsGroups as well from your script and then test it.

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