generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Script was working one moment, now it isn't.

Previous Thread :: Next Thread 
DoctorTempest is not online. DoctorTempest
Joined: 05 Jan 2013
Total Posts: 3838
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
DoctorTempest is not online. DoctorTempest
Joined: 05 Jan 2013
Total Posts: 3838
28 May 2013 01:34 AM
Oh, now it's working again. How bizzare.
Report Abuse
Arkose is not online. 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
DoctorTempest is not online. DoctorTempest
Joined: 05 Jan 2013
Total Posts: 3838
28 May 2013 01:57 AM
Changed wait time to 3, and back to 0.01, and voila.
Report Abuse
Arkose is not online. 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
DoctorTempest is not online. DoctorTempest
Joined: 05 Jan 2013
Total Posts: 3838
28 May 2013 02:00 AM
.. and breaks again

yours didn't work
Report Abuse
Arkose is not online. Arkose
Joined: 26 May 2013
Total Posts: 745
28 May 2013 02:01 AM
I would just try increasing the wait time.
Report Abuse
DoctorTempest is not online. DoctorTempest
Joined: 05 Jan 2013
Total Posts: 3838
28 May 2013 02:02 AM
Nope.
Report Abuse
Arkose is not online. Arkose
Joined: 26 May 2013
Total Posts: 745
28 May 2013 02:03 AM
Weird, and your path is correct?
Report Abuse
gamert7 is not online. 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
DoctorTempest is not online. DoctorTempest
Joined: 05 Jan 2013
Total Posts: 3838
28 May 2013 02:06 AM
Full script?
Report Abuse
Arkose is not online. 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 is not online. 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 is not online. 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 is not online. 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
DoctorTempest is not online. DoctorTempest
Joined: 05 Jan 2013
Total Posts: 3838
28 May 2013 02:10 AM
nothing is working
Report Abuse
gamert7 is not online. 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 is not online. 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
DoctorTempest is not online. DoctorTempest
Joined: 05 Jan 2013
Total Posts: 3838
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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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
DoctorTempest is not online. DoctorTempest
Joined: 05 Jan 2013
Total Posts: 3838
28 May 2013 02:17 AM
Did not work.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image