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: Makes absolutely no sense at all

Previous Thread :: Next Thread 
brandon58590 is not online. brandon58590
Joined: 08 Mar 2008
Total Posts: 996
16 Aug 2012 11:51 PM
Top part of my script:

Tool = script.Parent
Player = game.Players.LocalPlayer



blahblahblah



function waitForChild(parent, instance)
while parent:FindFirstChild(instance) == nil do
print("Waiting for ".. instance)
wait(.5)
end
end

waitForChild(Tool, "Flash")
waitForChild(Tool, "Clip")
waitForChild(Tool, "Ammo")
waitForChild(Tool.Handle, "Fire")
waitForChild(Tool.Handle, "Empty")
waitForChild(Player.PlayerGui, "AmmoGUI")

flash = Tool.Flash
clip = Tool.Clip
ammo = Tool.Ammo
fire = Tool.Handle.Fire
empty = Tool.Handle.Empty
agui = Player.PlayerGui.AmmoGUI
reloading = false


blahblahblah


Tool.Equipped:connect(function(mouse)
wait()
waitForChild(agui, "Ammo")
waitForChild(agui, "Scope")
agui.Ammo.Visible = true

blah

end

> Repetitively prints out "Waiting for Ammo"
> Make new local script in backpack

if game.Players.LocalPlayer.PlayerGui:FindFirstChild("Ammo") ~= nil then
print('screw you')
end

>Repetitively prints out "Screw you"

Any idea what is happening? I'm not sure if I'm being stupid or not.
Report Abuse
ArceusInator is not online. ArceusInator
Joined: 10 Oct 2009
Total Posts: 30553
16 Aug 2012 11:54 PM
blahblahblah does not help us.

If you don't want strange and non-descriptive outputs, don't use free models.
Report Abuse
brandon58590 is not online. brandon58590
Joined: 08 Mar 2008
Total Posts: 996
16 Aug 2012 11:55 PM
It's not a free model. It's SUPPOSED be working fine. Also the blahblahblah is unimportant, unrelated stuff to the problem.
Report Abuse
ArceusInator is not online. ArceusInator
Joined: 10 Oct 2009
Total Posts: 30553
17 Aug 2012 12:26 AM
If you know what's not related, you should know what is related. Otherwise, you have to assume that everything is related.
Report Abuse
brandon58590 is not online. brandon58590
Joined: 08 Mar 2008
Total Posts: 996
17 Aug 2012 12:30 AM
I only posted the related stuff, why else would I remove small chunks of code? Anyways, do you see any problems in the code I posted?
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