smurf279
|
  |
| Joined: 15 Mar 2010 |
| Total Posts: 6871 |
|
|
| 22 Jul 2011 04:50 PM |
Last time I posted this nobody decided to help. . .
I made this script and for some reason ImageLabel1 will not show up under ScreenGui1 when I check in explorer. I tryed adding a print at line 9 to see if ImageLabel1 is even a child of ScreenGui1 and it says it is in the output. Is there anything I may be doing wrong?
-- while wait(0.25) do for _,v in pairs(game.Players:GetPlayers()) do lol = game.Lighting.ImageLabel1:clone() c = v.PlayerGui:FindFirstChild("ScreenGui1") if c then lol.Parent = c Torso = v.Character.Torso for _,b in pairs(c:GetChildren()) do print(b) if b.Name == "ImageLabel1" then b.Position = UDim2.new(0.129999993, Torso.Position.x,0.650000036, Torso.Position.z) b:remove() end end end end end -- |
|
|
| Report Abuse |
|
|
|
| 22 Jul 2011 04:51 PM |
Eww, none of your variables are words, and you put all your ends on one line.
_____________ Turtle power! |
|
|
| Report Abuse |
|
|
| |
|
|
| 22 Jul 2011 04:52 PM |
| if you look b is not a thing yet. also print can go after you set it then... |
|
|
| Report Abuse |
|
|
|
| 22 Jul 2011 04:53 PM |
while wait(0.25) do for _,Player in pairs(game.Players:GetPlayers()) do local ImgLabel = game.Lighting.ImageLabel1:clone() local Gui = Player.PlayerGui:FindFirstChild("ScreenGui1") if Gui then ImgLabel.Parent = Gui local Torso = Player.Character.Torso for _, Value in pairs(Gui:GetChildren()) do print(Value.Name) if Value.Name == "ImageLabel1" then Value.Position = UDim2.new(0.129999993, Torso.Position.x,0.650000036, Torso.Position.z) Value:Remove() end end end end end
_____________ Turtle power! |
|
|
| Report Abuse |
|
|
smurf279
|
  |
| Joined: 15 Mar 2010 |
| Total Posts: 6871 |
|
|
| 22 Jul 2011 04:58 PM |
@Cody b stands for the children of c
@TheC everything I did in my script was valid and what did you change in the above script other then changing the variable names? |
|
|
| Report Abuse |
|
|
smurf279
|
  |
| Joined: 15 Mar 2010 |
| Total Posts: 6871 |
|
|
| 22 Jul 2011 05:00 PM |
| The script you edited is having the same problem as mine |
|
|
| Report Abuse |
|
|
smurf279
|
  |
| Joined: 15 Mar 2010 |
| Total Posts: 6871 |
|
|
| 22 Jul 2011 05:52 PM |
| Is there somewhere I can go other then SH to ask for help on this? |
|
|
| Report Abuse |
|
|
|
| 22 Jul 2011 05:54 PM |
b:remove()
Why did you remove the spot on the radar? :P |
|
|
| Report Abuse |
|
|
smurf279
|
  |
| Joined: 15 Mar 2010 |
| Total Posts: 6871 |
|
|
| 22 Jul 2011 06:03 PM |
@Electric I added 'lol = game.Lighting.ImageLabel1:clone()' in the begininning so I need to delete it unless I want the radar spammed with ImageLabels. |
|
|
| Report Abuse |
|
|
|
| 22 Jul 2011 06:21 PM |
| Then parent it AFTER deleting and not before. Or break the loop using 'break'. |
|
|
| Report Abuse |
|
|
smurf279
|
  |
| Joined: 15 Mar 2010 |
| Total Posts: 6871 |
|
|
| 22 Jul 2011 06:47 PM |
| I don't get what you mean by that. How would I even be able to delete the ImageLabel if lol isn't a child of c? |
|
|
| Report Abuse |
|
|
|
| 22 Jul 2011 06:48 PM |
while wait(0.25) do for _,v in pairs(game.Players:GetPlayers()) do lol = game.Lighting.ImageLabel1:clone() c = v.PlayerGui:FindFirstChild("ScreenGui1") if c then Torso = v.Character.Torso for _,b in pairs(c:GetChildren()) do print(b) if b.Name == "ImageLabel1" then b.Position = UDim2.new(0.129999993, Torso.Position.x,0.650000036, Torso.Position.z) b:remove() end end lol.Parent = c end end end |
|
|
| Report Abuse |
|
|
smurf279
|
  |
| Joined: 15 Mar 2010 |
| Total Posts: 6871 |
|
|
| 22 Jul 2011 07:11 PM |
Alright I got it working Thanks! |
|
|
| Report Abuse |
|
|