|
| 15 Apr 2012 08:17 PM |
Hello,
My code shown below is suppose to create a billboardgui based upon a bunch of "if" event's to show if the plane is an Enemy or a friendly plane. I tried to do it but I get no billboardgui's and no output.
game.Players.PlayerAdded:connect(function(newPlayer) local friendlyMarker = "http://www.roblox.com/asset/?id=77694350" local enemyMarker = "http://www.roblox.com/asset/?id=77694363" function findPlanes() for _,v in pairs(game.Workspace:GetChildren()) do if (v:IsA("Model")) and (v:findFirstChild("Humanoid")) then if (v:IsA("Model")) and (v.Name == "Plane") and (v:findFirstChild("acesTag")) then local newPlaneID_BillboardGui,newPlaneID_ImageLabel = Instance.new("BillboardGui"),Instance.new("ImageLabel") newPlaneID_BillboardGui.Parent = v:findFirstChild("acesTag") newPlaneID_ImageLabel.Parent = newPlaneID_BillboardGui newPlaneID_BillboardGui.Adornee = v:findFirstChild("acesTag") newPlaneID_BillboardGui.Size = {10,0},{10,0} newPlaneID_ImageLabel.Size = {1,0},{1,0} newPlaneID_ImageLabel.Image = enemyMarker end elseif (v:IsA("Model")) and (v:findFirstChild("Humanoid")) then if (v:IsA("Model")) and (v.Name == "Plane") and (v:findFirstChild("strikersTag")) then local newPlaneID_BillboardGui,newPlaneID_ImageLabel = Instance.new("BillboardGui"),Instance.new("ImageLabel") newPlaneID_BillboardGui.Parent = v:findFirstChild("strikersTag") newPlaneID_ImageLabel.Parent = newPlaneID_BillboardGui newPlaneID_BillboardGui.Adornee = v:findFirstChild("strikersTag") newPlaneID_BillboardGui.Size = {10,0},{10,0} newPlaneID_ImageLabbel.Size = {1,0},{1,0} newPlaneID_ImageLabel.Image = friendlyMarker end end findPlanes(v) end end end)
|
|
|
| Report Abuse |
|
|
| 15 Apr 2012 08:18 PM |
| I notice the spelling mistake in ImageLabel down toward the bottom. Ignore it. |
|
|
| Report Abuse |
|
|
| 15 Apr 2012 08:19 PM |
| Code is also in a LocalScript, and the localscript is in StarterPack |
|
|
| Report Abuse |
|
| |
| |