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
 

class script

Previous Thread :: Next Thread 
telamonlikespokemon is not online. telamonlikespokemon
Joined: 10 Jun 2011
Total Posts: 22
22 Jun 2012 05:04 PM
local player = game.Players.LocalPlayer
local menu = script.Parent.Parent
local Class1 = menu.Assault


function clicked()
game.Lighting("M1Thompson"):Clone().Parent = player.Backpack
game.Lighting["Frag Grenade"]:Clone().Parent = player.Backpack
game.Lighting("M1911"):Clone().Parent = player.Backpack
g = menu:GetChildren()
for i = 1, #g do
if g[i].ClassName == "TextButton" then
g[i].Visible = false
end
end
end


Class1.MouseButton1Click:connect(clicked)

output says nothing,also this is in a local script inside a textbutton
Report Abuse
telamonlikespokemon is not online. telamonlikespokemon
Joined: 10 Jun 2011
Total Posts: 22
22 Jun 2012 05:12 PM
help,bump
Report Abuse
telamonlikespokemon is not online. telamonlikespokemon
Joined: 10 Jun 2011
Total Posts: 22
22 Jun 2012 05:44 PM
BUMP why doesnt anyone replie
Report Abuse
telamonlikespokemon is not online. telamonlikespokemon
Joined: 10 Jun 2011
Total Posts: 22
22 Jun 2012 07:40 PM
bump!
Report Abuse
swmaniac is not online. swmaniac
Joined: 28 Jun 2008
Total Posts: 15773
22 Jun 2012 07:41 PM
game.Lighting["M1911"]:Clone().Parent = player.Backpack
Report Abuse
telamonlikespokemon is not online. telamonlikespokemon
Joined: 10 Jun 2011
Total Posts: 22
22 Jun 2012 07:50 PM
still doesnt work after i changed that
Report Abuse
swmaniac is not online. swmaniac
Joined: 28 Jun 2008
Total Posts: 15773
22 Jun 2012 07:51 PM
game.Lighting["M1Thompson"]:Clone().Parent = player.Backpack
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
22 Jun 2012 08:34 PM
function clicked()
pcall(function()
game.Lighting["M1Thompson"]:Clone().Parent = player.Backpack
game.Lighting["Frag Grenade"]:Clone().Parent = player.Backpack
game.Lighting["M1911"]:Clone().Parent = player.Backpack
end)
g = menu:GetChildren()
for i = 1, #g do
if g[i].ClassName == "TextButton" then
g[i].Visible = false
end
end
end

Idk, I just put a pcall just in case the player isn't loaded or something.

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