awas3
|
  |
| Joined: 24 Oct 2010 |
| Total Posts: 2854 |
|
|
| 27 May 2012 05:06 AM |
function o() g = game.Workspace.trf:Clone() g.Parent = game.Players.LocalPlayer.PlayerGui end
game.Players.ChildAdded:connect(o)
Don't know what is wrong with script. |
|
|
| Report Abuse |
|
|
|
| 27 May 2012 05:10 AM |
function o() g = game.Workspace.trf:Clone() repeat wait() until game.Players.LocalPlayer:FindFirstChild("PlayerGui") g.Parent = game.Players.LocalPlayer.PlayerGui end
game.Players.ChildAdded:connect(o)
Sometimes you have to wait for the PlayerGui to load.
~ My RPG is in BETA: http://www.roblox.com/--place?id=80741686 ~ |
|
|
| Report Abuse |
|
|
Aurarus
|
  |
| Joined: 22 Dec 2008 |
| Total Posts: 4761 |
|
| |
|
|
| 27 May 2012 05:13 AM |
@Aurarus, because it's in a LocalScript. You can index the player via LocalPlayer.
~ My RPG is in BETA: http://www.roblox.com/--place?id=80741686 ~ |
|
|
| Report Abuse |
|
|
awas3
|
  |
| Joined: 24 Oct 2010 |
| Total Posts: 2854 |
|
| |
|
|
| 27 May 2012 05:51 AM |
Try this:
game.Players.PlayerAdded:connect(function(nP) nP.CharacterAdded:wait() repeat wait() until nP:FindFirstChild("PlayerGui") Workspace.trf:Clone().Parent = nP.PlayerGui end)
It should work in a normal script.
~ My RPG is in BETA: http://www.roblox.com/--place?id=80741686 ~ |
|
|
| Report Abuse |
|
|
awas3
|
  |
| Joined: 24 Oct 2010 |
| Total Posts: 2854 |
|
|
| 27 May 2012 05:59 AM |
Now another problem, whats wrong with this:
function group(new) g = game.Players:findFirstChild(new.Name) if g then if g:IsInGroup(527579) then game.Players.LocalPlayer.PlayerGui.trf.Backround.detectorbackround.det.Text = "Tactical Roblox Forces" else game.Players.LocalPlayer.PlayerGui.trf.Backround.detectorbackround.det.Text = "Raider/Visitor/Member" end end end
game.Players.ChildAdded:connect(group) |
|
|
| Report Abuse |
|
|
|
| 27 May 2012 06:07 AM |
game.Players.PlayerAdded:connect(function(nP) if nP:IsInGroup(527579) then repeat wait() until nP:FindFirstChild("PlayerGui") nP.trf.Background.detectorbackground.det.Text = "Tactical Roblox Forces" else nP.trf.Background.detectorbackground.det.Text = "Raider/Visitor/Member" end end)
If that still isn't work, you might want to add a wait(3) after the if statement, to let the other script clone the trf into the playergui.
~ My RPG is in BETA: http://www.roblox.com/--place?id=80741686 ~ |
|
|
| Report Abuse |
|
|
awas3
|
  |
| Joined: 24 Oct 2010 |
| Total Posts: 2854 |
|
| |
|
|
| 27 May 2012 06:16 AM |
game.Players.PlayerAdded:connect(function(nP) if nP:IsInGroup(527579) then repeat wait() until nP:FindFirstChild("PlayerGui") nP.trf.Backround.detectorbackround.det.Text = "Tactical Roblox Forces" else nP.trf.Backround.detectorbackround.det.Text = "Raider/Visitor/Member" end end)
~ My RPG is in BETA: http://www.roblox.com/--place?id=80741686 ~ |
|
|
| Report Abuse |
|
|
awas3
|
  |
| Joined: 24 Oct 2010 |
| Total Posts: 2854 |
|
|
| 27 May 2012 06:20 AM |
Thats just the same as last time...
And no, it doesnt work. |
|
|
| Report Abuse |
|
|