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: How would I do this?

Previous Thread :: Next Thread 
powertool is not online. powertool
Joined: 01 Feb 2008
Total Posts: 3771
27 Nov 2013 10:13 PM
local localplayer = game.Players.LocalPlayer
local db = false

function LOAD()
--Stuff that the rest of the script does

end
if db == false then
localplayer:WaitForCharacterLoad()
LOAD()
end
Report Abuse
powertool is not online. powertool
Joined: 01 Feb 2008
Total Posts: 3771
27 Nov 2013 10:27 PM
Bump.
Report Abuse
REM25 is online. REM25
Joined: 28 Feb 2010
Total Posts: 3154
27 Nov 2013 10:55 PM
if db == false then
db = true


but I dont know about your question, what is your objective?
Report Abuse
powertool is not online. powertool
Joined: 01 Feb 2008
Total Posts: 3771
27 Nov 2013 10:59 PM
The question is, how would I wait for the character to finish loading before the gun script starts running?

The if statement is just there, similar to a function, except I don't need to call it, and db starts out as false.
Report Abuse
xPRESIDENTx is not online. xPRESIDENTx
Joined: 10 Jun 2011
Total Posts: 815
27 Nov 2013 11:01 PM
use this

player = blah

while (not player.Character.Head) do wait(0.1) end
Report Abuse
powertool is not online. powertool
Joined: 01 Feb 2008
Total Posts: 3771
27 Nov 2013 11:06 PM
Didn't work. I still need to drop and pickup the gun.
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