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 » Scripters
Home Search
 

Re: Looping (HELP)

Previous Thread :: Next Thread 
BlixBlocker is not online. BlixBlocker
Joined: 24 Dec 2013
Total Posts: 657
02 Jun 2015 05:59 PM
Hello. I am making a GUI so when you click the "PLAY" button, it teleports you to 0,0,0 and then gives you a gun.
Here is the problem:
It works fully, but after that, when I reset and try it over again it doesn't work.
Script:

script.Parent.Parent.Parent.Visible = false -- the gui turns invisible
game.Lighting.Grenade.Parent = player.Character -- gives gun to player
character:MoveTo(Vector3.new(0,0,0)) -- moves character to 0,0,0

this is fully made by me and I didn't use any free models so of course it wont be perfect.

I also tried this:
while true do
script.Parent.Parent.Parent.Visible = false -- the gui turns invisible
game.Lighting.Grenade.Parent = player.Character -- gives gun to player
character:MoveTo(Vector3.new(0,0,0)) -- moves character to 0,0,0
end



can anyone help me?


Remember, it works the first time, but then when I reset and click "PLAY" again, it just turns the gui invisible but does nothing else.



I'm not a rapper.
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
02 Jun 2015 06:01 PM
remove the loop first, it isnt necessary
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
02 Jun 2015 06:01 PM
This is in an event, yes?
Report Abuse
BlixBlocker is not online. BlixBlocker
Joined: 24 Dec 2013
Total Posts: 657
02 Jun 2015 06:02 PM
What do you mean?


I'm not a rapper.
Report Abuse
BlixBlocker is not online. BlixBlocker
Joined: 24 Dec 2013
Total Posts: 657
02 Jun 2015 06:07 PM
bump


I'm not a rapper.
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
02 Jun 2015 06:10 PM
local gui = script.Parent

gui.MouseButton1Click:connect(function()
--code
end)
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
02 Jun 2015 06:10 PM
game.Lighting.Grenade.Parent = player.Character -- gives gun to player

You are moving the Grenade, that's why it works once.
Figure out the error.
Report Abuse
BlixBlocker is not online. BlixBlocker
Joined: 24 Dec 2013
Total Posts: 657
02 Jun 2015 06:16 PM
Thanks!
The answer was right in front of my face, but I just didn't notice it...


I'm not a rapper.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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