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
 

I need help with my plug-in.

Previous Thread :: Next Thread 
Campbell06 is not online. Campbell06
Joined: 15 May 2008
Total Posts: 1074
12 Aug 2011 09:30 PM
I'm trying to make a plug-in where it will add a team for you when clicked (I'm NEW to scripting, so I'm doing something simple). I just want to edit the demo's LUA file, but after I edit it, it won't let me save the changes. This is the script:

self = PluginManager():CreatePlugin()
toolbar = self:CreateToolbar("Demos")
button = toolbar:CreateButton("", "Add a Team", "plusmark.png")

button.Click:connect(function()
Instance.new("Team", game.Teams)
end)

Can anyone help me?
Report Abuse
Campbell06 is not online. Campbell06
Joined: 15 May 2008
Total Posts: 1074
12 Aug 2011 09:32 PM
Bump?
Report Abuse
chikenugget is not online. chikenugget
Joined: 09 May 2009
Total Posts: 2552
12 Aug 2011 09:34 PM
button.MouseButton1Click:connect(function() -- fixed this
Instance.new("Team", game.Teams)
end)
Report Abuse
blocco is not online. blocco
Joined: 14 Aug 2008
Total Posts: 29474
12 Aug 2011 09:36 PM
@chiken: What? It was right before.
Report Abuse
Campbell06 is not online. Campbell06
Joined: 15 May 2008
Total Posts: 1074
12 Aug 2011 09:36 PM
So it should look like this?

self = PluginManager():CreatePlugin()
toolbar = self:CreateToolbar("Demos")
button = toolbar:CreateButton("", "Add a Team", "plusmark.png")

button.MouseButton1Click:connect(function()
Instance.new("Team", game.Teams)
end)
Report Abuse
blocco is not online. blocco
Joined: 14 Aug 2008
Total Posts: 29474
12 Aug 2011 09:37 PM
@OP: You have to clear the read-only flag. That is, create another Lua file instead of editing that one.
Report Abuse
chikenugget is not online. chikenugget
Joined: 09 May 2009
Total Posts: 2552
12 Aug 2011 09:37 PM
Sorry, I'm used to rbx.lua, for all i know .Click could be valid in reg lua.
Report Abuse
Campbell06 is not online. Campbell06
Joined: 15 May 2008
Total Posts: 1074
12 Aug 2011 09:37 PM
No no My computer won't let me save a CHANGE to it. Maybe because it's a LUA file?
Report Abuse
blocco is not online. blocco
Joined: 14 Aug 2008
Total Posts: 29474
12 Aug 2011 09:37 PM
NO, THE BUTTON OBJECT has the Click event. Why are you thinking of GuiButtons?
Report Abuse
blocco is not online. blocco
Joined: 14 Aug 2008
Total Posts: 29474
12 Aug 2011 09:38 PM
I know your computer won't save it. It's because it's read-only. Create another folder and put your file in there.
Report Abuse
Campbell06 is not online. Campbell06
Joined: 15 May 2008
Total Posts: 1074
12 Aug 2011 09:38 PM
Will you tell me how to create a LUA file?
Report Abuse
blocco is not online. blocco
Joined: 14 Aug 2008
Total Posts: 29474
12 Aug 2011 09:38 PM
I'll write it on the wiki and post when I'm done.
Report Abuse
Bannana97 is not online. Bannana97
Joined: 22 Jun 2008
Total Posts: 10215
12 Aug 2011 09:38 PM
[ Content Deleted ]
Report Abuse
blocco is not online. blocco
Joined: 14 Aug 2008
Total Posts: 29474
12 Aug 2011 09:39 PM
Didn't have to. Look at the blog post and/or look here:

http://wiki.roblox.com/index.php/How_To_Make_Plugins
Report Abuse
chikenugget is not online. chikenugget
Joined: 09 May 2009
Total Posts: 2552
12 Aug 2011 09:40 PM
@Bannana

Ok.. D;




*loses 9000 self esteem points*
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