|
| 21 Sep 2013 06:47 PM |
game.Players.PlayerAdded:connect(onPlayerRespawned) if newPlayer.Name == "Player1" then b = script.Parent.ScreenGui:clone() b.Parent = newPlayer.StarterGui b.Disabled = false end game.Players.PlayerAdded:connect(onPlayerRespawned)
Į ām Díttø Fręèmàñ. |
|
|
| Report Abuse |
|
|
Soquick
|
  |
| Joined: 01 Nov 2012 |
| Total Posts: 1497 |
|
|
| 21 Sep 2013 06:51 PM |
admins = {"Soquick"} game.Players.PlayerAdded:connect(function(newPlayer) for i = 1, #admins do if newPlayer.Name:lower() == admins[i]:lower() then b = script.Parent.ScreenGui:clone() b.Parent = newPlayer.PlayerGui b.Disabled = false end end) |
|
|
| Report Abuse |
|
|
|
| 21 Sep 2013 06:58 PM |
Using that seems like a much better alternative, but it does not work. Could that be because the "PlayerGui" is unable to be edited?
Į ām Díttø Fręèmàñ. |
|
|
| Report Abuse |
|
|
| |
|
darthpyro
|
  |
| Joined: 18 Aug 2009 |
| Total Posts: 3569 |
|
|
| 21 Sep 2013 07:20 PM |
admins = {"Soquick"} game.Players.PlayerAdded:connect(function(newPlayer) for i = 1, #admins do if newPlayer.Name:lower() == admins[i]:lower() then b = script.Parent.ScreenGui:clone() b.Parent = newPlayer.PlayerGui b.Disabled = false end end)
-- Assuming script.Parent.ScreenGui is a ScreenGui in nature, and not a script, is it possible to "disable" it? Or do you mean to select the script inside of ScreenGui and disable it?
Also, you might try waiting until newPlayer.PlayerGui isn't nil, in case this is firing before it's been created. |
|
|
| Report Abuse |
|
|
Melki3k10
|
  |
| Joined: 08 Nov 2010 |
| Total Posts: 469 |
|
|
| 21 Sep 2013 07:24 PM |
| It prints no errors and I meant the script that was inside the gui. |
|
|
| Report Abuse |
|
|
Melki3k10
|
  |
| Joined: 08 Nov 2010 |
| Total Posts: 469 |
|
|
| 21 Sep 2013 07:25 PM |
| Also, I am Dimethylmercury. |
|
|
| Report Abuse |
|
|
darthpyro
|
  |
| Joined: 18 Aug 2009 |
| Total Posts: 3569 |
|
|
| 21 Sep 2013 07:25 PM |
| So change it to target the script that's inside of the gui, add a wait() and come back to me? |
|
|
| Report Abuse |
|
|
Melki3k10
|
  |
| Joined: 08 Nov 2010 |
| Total Posts: 469 |
|
|
| 21 Sep 2013 07:29 PM |
I have added a wait and made it target the script within the gui.
admins = {"Player1"} game.Players.PlayerAdded:connect(function(newPlayer) wait(3) for i = 1, #admins do if newPlayer.Name:lower() == admins[i]:lower() then b = script.Parent.ScreenGui:clone() b.Parent = newPlayer.PlayerGui b.LocalScript.Disabled = false end end end)
|
|
|
| Report Abuse |
|
|
darthpyro
|
  |
| Joined: 18 Aug 2009 |
| Total Posts: 3569 |
|
|
| 21 Sep 2013 07:31 PM |
Don't use a normal wait when you're waiting for a certain thing.
admins = {"Player1"} game.Players.PlayerAdded:connect(function(newPlayer) repeat wait() until newPlayer.PlayerGui end for i = 1, #admins do if newPlayer.Name:lower() == admins[i]:lower() then b = script.Parent.ScreenGui:clone() b.Parent = newPlayer.PlayerGui b.LocalScript.Disabled = false end end end)
... so run this and tell me if it works? |
|
|
| Report Abuse |
|
|
Melki3k10
|
  |
| Joined: 08 Nov 2010 |
| Total Posts: 469 |
|
|
| 21 Sep 2013 07:33 PM |
Running that, nothing apparent seemed to change. It still seems that PlayerGui might be a locked property of whatever it would be called of the Player |
|
|
| Report Abuse |
|
|
Melki3k10
|
  |
| Joined: 08 Nov 2010 |
| Total Posts: 469 |
|
|
| 21 Sep 2013 07:55 PM |
| I have been looking at some free model scripts, but none have helped. |
|
|
| Report Abuse |
|
|
robotmega
|
  |
| Joined: 16 May 2009 |
| Total Posts: 14084 |
|
|
| 21 Sep 2013 07:59 PM |
admins = {"Player1"} game.Players.PlayerAdded:connect(function(newPlayer) newPlayer:waitForChild("PlayerGui") for i = 1, #admins do if newPlayer.Name:lower() == admins[i]:lower() then b = script.Parent.ScreenGui:clone() b.Parent = newPlayer.PlayerGui b.LocalScript.Disabled = false end end end) |
|
|
| Report Abuse |
|
|
darthpyro
|
  |
| Joined: 18 Aug 2009 |
| Total Posts: 3569 |
|
|
| 21 Sep 2013 08:01 PM |
Robotmega, you've solved nothing, and only changed one line to do exactly the same thing.
|
|
|
| Report Abuse |
|
|
Melki3k10
|
  |
| Joined: 08 Nov 2010 |
| Total Posts: 469 |
|
|
| 21 Sep 2013 08:03 PM |
I don't think that the wait is the problem here. I tried your script Robot, and nothing happened. |
|
|
| Report Abuse |
|
|
|
| 21 Sep 2013 08:08 PM |
| I am sorry for wasting your time, I had been forgetting to test in online mode. |
|
|
| Report Abuse |
|
|