|
| 28 May 2013 01:33 AM |
I know I sound completely useless displaying this script to you.
But when I was testing, one moment it worked, a few minutes later it didn't.
function onEntered(Player) wait(0.01) game.Lighting.Gui:clone().Parent = Player.PlayerGui
end
game.Players.ChildAdded:connect(onEntered) |
|
|
| Report Abuse |
|
|
|
| 28 May 2013 01:34 AM |
| Oh, now it's working again. How bizzare. |
|
|
| Report Abuse |
|
|
Arkose
|
  |
| Joined: 26 May 2013 |
| Total Posts: 745 |
|
|
| 28 May 2013 01:55 AM |
Try to stick to using PlayerAdded:
function onEntered(Player) wait(0.01) game.Lighting.Gui:clone().Parent = Player.PlayerGui
end
game.Players.PlayerAdded:connect(onEntered) |
|
|
| Report Abuse |
|
|
|
| 28 May 2013 01:57 AM |
| Changed wait time to 3, and back to 0.01, and voila. |
|
|
| Report Abuse |
|
|
Arkose
|
  |
| Joined: 26 May 2013 |
| Total Posts: 745 |
|
|
| 28 May 2013 02:00 AM |
| Change it to PlayerAdded too, because if something is moved into Players it will break this code. |
|
|
| Report Abuse |
|
|
|
| 28 May 2013 02:00 AM |
.. and breaks again
yours didn't work |
|
|
| Report Abuse |
|
|
Arkose
|
  |
| Joined: 26 May 2013 |
| Total Posts: 745 |
|
|
| 28 May 2013 02:01 AM |
| I would just try increasing the wait time. |
|
|
| Report Abuse |
|
|
| |
|
Arkose
|
  |
| Joined: 26 May 2013 |
| Total Posts: 745 |
|
|
| 28 May 2013 02:03 AM |
| Weird, and your path is correct? |
|
|
| Report Abuse |
|
|
gamert7
|
  |
| Joined: 18 Nov 2008 |
| Total Posts: 4986 |
|
|
| 28 May 2013 02:04 AM |
Here is what I do in a local script;
local plr = game.Players.LocalPlayer if plr:FindFirstChild("Intro") == nil then k=Instance.new("BoolValue", plr) k.Value = false k.Name = "Intro" script = game.Lighting.Gui:Clone() script.Parent = plr.PlayerGui
else print("Already there.")
After that I simply just check the Bool to true after the Gui is done doing what its suppose too. |
|
|
| Report Abuse |
|
|
| |
|
Arkose
|
  |
| Joined: 26 May 2013 |
| Total Posts: 745 |
|
|
| 28 May 2013 02:08 AM |
| I don't understand the point of that script... |
|
|
| Report Abuse |
|
|
gamert7
|
  |
| Joined: 18 Nov 2008 |
| Total Posts: 4986 |
|
|
| 28 May 2013 02:08 AM |
| ... What you want the part that checks it too true as well? |
|
|
| Report Abuse |
|
|
Arkose
|
  |
| Joined: 26 May 2013 |
| Total Posts: 745 |
|
|
| 28 May 2013 02:10 AM |
| Erm if they are just joining the game, and you want the gui to display every time, that boolvalue will be absolutely useless. |
|
|
| Report Abuse |
|
|
Arkose
|
  |
| Joined: 26 May 2013 |
| Total Posts: 745 |
|
|
| 28 May 2013 02:10 AM |
| Erm if they are just joining the game, and you want the gui to display every time, that boolvalue will be absolutely useless. |
|
|
| Report Abuse |
|
|
| |
|
gamert7
|
  |
| Joined: 18 Nov 2008 |
| Total Posts: 4986 |
|
|
| 28 May 2013 02:10 AM |
@ark.
I assume he is using a intro gui. So I wrote what I do.
The point is to check a boolean before copying the script if the boolean is set to false (the player just entered). Then the gui will be copied to the player's player gui. If is set to false then it won't it is as simple as that.... |
|
|
| Report Abuse |
|
|
Arkose
|
  |
| Joined: 26 May 2013 |
| Total Posts: 745 |
|
|
| 28 May 2013 02:10 AM |
| Unless you plan on using a .CharacterAdded event, which again would be useless. |
|
|
| Report Abuse |
|
|
|
| 28 May 2013 02:11 AM |
Nonono.
What I want in a nutshell:
-Player enters game -Player is given a GUI
The player is only given the GUI that ONE TIME.
My old script isn't working, and there isn't a thing wrong with it. |
|
|
| Report Abuse |
|
|
gamert7
|
  |
| Joined: 18 Nov 2008 |
| Total Posts: 4986 |
|
|
| 28 May 2013 02:12 AM |
| Why would I use characteradded when this script runs every time the player respawns? |
|
|
| Report Abuse |
|
|
Arkose
|
  |
| Joined: 26 May 2013 |
| Total Posts: 745 |
|
|
| 28 May 2013 02:12 AM |
game.Players.PlayerAdded:connect(function(play) repeat wait(0.1) until play.PlayerGui game.Lighting.Gui:clone().Parent = play.PlayerGui end)
Try that, tell me what happens.
|
|
|
| Report Abuse |
|
|
Arkose
|
  |
| Joined: 26 May 2013 |
| Total Posts: 745 |
|
|
| 28 May 2013 02:12 AM |
game.Players.PlayerAdded:connect(function(play) repeat wait(0.1) until play.PlayerGui game.Lighting.Gui:clone().Parent = play.PlayerGui end)
Try that, tell me what happens.
|
|
|
| Report Abuse |
|
|
gamert7
|
  |
| Joined: 18 Nov 2008 |
| Total Posts: 4986 |
|
|
| 28 May 2013 02:14 AM |
Heh. You're bossy. But, whatever.
while true do end Perfect. |
|
|
| Report Abuse |
|
|
Arkose
|
  |
| Joined: 26 May 2013 |
| Total Posts: 745 |
|
|
| 28 May 2013 02:14 AM |
You are misunderstanding. He is using a .PlayerAdded event, it will fire once a player joins the game. You have a bool value that checks if the player has already has had the GUI, but it never will have because its just joining the game.
If it was a .CharacterAdded event, your code would he very helpful. |
|
|
| Report Abuse |
|
|
| |
|