I'm trying to make a billboard gui so when you walk up to it it shows your player image but it wont work here is my code local Brick = script.Parent.Parent.Parent
local Picture = script.Parent.UserImage
local User = script.Parent.Usename
function onTouch(Object)
local Character = Object.Parent.findFirstChild("Humanoid") if(Character ~= nil)then local player = game.Players:GetPlayerFromCharacter(Object.Parent) if(Player ~= nil)then Player.Image = "http" .. Player.Name User.Text = Player.Name end end
end
script.Parent.Touched:connect(OnTouch)
Try this, haven't tested it so not sure if it works 100% like it should.
local Brick = script.Parent local Picture = script.Parent.BillboardGui:WaitForChild('UserImage') local User = script.Parent.BillboardGui:WaitForChild('UserName') function onTouch(Object) local Character = Object.Parent:FindFirstChild("Humanoid") if(Character ~= nil)then local player = game.Players:GetPlayerFromCharacter(Object.Parent) if(player ~= nil)then Picture.Image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&username=" .. player.Name User.Text = player.Name end end end script.Parent.Touched:connect(onTouch)