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: this LocalGui...doesnt work(colors)

Previous Thread :: Next Thread 
mbruce0810 is not online. mbruce0810
Joined: 25 Jan 2008
Total Posts: 1560
25 Jan 2009 01:41 PM
local Tool = script.Parent

enabled = true
function onButton1Down(mouse)
if not enabled then
return
end

enabled = false
mouse.Icon = "rbxasset://textures\\GunWaitCursor.png"

wait(.5)
mouse.Icon = "rbxasset://textures\\GunCursor.png"
enabled = true

end

function onKeyDown(key)
if (key~=nil) then
key = key:lower()
if (key=="b") then
script.Parent.Handle1.BrickColor = BrickColor.new(23)
end
if (key=="r") then
script.Parent.Handle1.BrickColor = BrickColor.new(21)
end
if (key=="y") then
script.Parent.Handle1.BrickColor = BrickColor.new(24)
end
if (key=="u") then
script.Parent.Handle1.BrickColor = BrickColor.new(106)
end
if (key=="p") then
script.Parent.Handle1.BrickColor = BrickColor.new(104)
end
if (key=="g") then
script.Parent.Handle1.BrickColor = BrickColor.new(37)
end
if (key=="x") then
script.Parent.Handle1.BrickColor = BrickColor.new(1)
end
if (key=="z") then
script.Parent.Handle1.BrickColor = BrickColor.new(26)
end
if (key=="q") then
script.Parent.Handle1.Transparency = 0.1
end
if (key=="e") then
script.Parent.Handle1.Transparency = 1
end
end
end

function onEquippedLocal(mouse)

if mouse == nil then
print("Mouse not found")
return
end

mouse.Icon = "rbxasset://textures\\GunCursor.png"
mouse.Button1Down:connect(function() onButton1Down(mouse) end)
mouse.KeyDown:connect(onKeyDown)


Tool.Equipped:connect(onEquippedLocal)
Report Abuse
mbruce0810 is not online. mbruce0810
Joined: 25 Jan 2008
Total Posts: 1560
25 Jan 2009 01:46 PM
actually now the whole thing doesnt work...
Report Abuse
mbruce0810 is not online. mbruce0810
Joined: 25 Jan 2008
Total Posts: 1560
25 Jan 2009 01:54 PM
can sum1 help please
Report Abuse
mbruce0810 is not online. mbruce0810
Joined: 25 Jan 2008
Total Posts: 1560
25 Jan 2009 02:17 PM
OUTPUT: Players.Player.Backpack.Lightsaber.Local Gui:62: attempt to index global 'mouse' (a nil value)
Report Abuse
mbruce0810 is not online. mbruce0810
Joined: 25 Jan 2008
Total Posts: 1560
25 Jan 2009 03:46 PM
I guess I didnt define "mouse" but how do I do that
Report Abuse
mbruce0810 is not online. mbruce0810
Joined: 25 Jan 2008
Total Posts: 1560
27 Jan 2009 05:29 PM
yeah, please help. much appreciated.
Report Abuse
jocopa3 is not online. jocopa3
Joined: 26 May 2008
Total Posts: 2167
27 Jan 2009 05:37 PM
Look in this wiki forum. It is at the bottom.

http://wiki.roblox.com/index.php/How_to_script_a_HopperBin_Tool
Report Abuse
DingDong272 is not online. DingDong272
Top 100 Poster
Joined: 08 Dec 2007
Total Posts: 9860
27 Jan 2009 05:39 PM
I don't see anything wrong with it, and I'm not good with Tools but I don't see how 'mouse' could be nil, you defined it correctly and such.
Report Abuse
DingDong272 is not online. DingDong272
Top 100 Poster
Joined: 08 Dec 2007
Total Posts: 9860
27 Jan 2009 05:41 PM
Jocopa, this is a TOOL, not a hopperbin.
Report Abuse
Clone512 is not online. Clone512
Joined: 02 Mar 2008
Total Posts: 7810
27 Jan 2009 05:42 PM
You never ended the onEquiped...
Report Abuse
jocopa3 is not online. jocopa3
Joined: 26 May 2008
Total Posts: 2167
27 Jan 2009 05:43 PM
Dingdong a Hopperbin is the same as a tool. They are just modified for bricks or scripts...
Report Abuse
Clone512 is not online. Clone512
Joined: 02 Mar 2008
Total Posts: 7810
27 Jan 2009 05:44 PM
jocopa3, no they arn't one goes into the player one doesn't.
Report Abuse
jocopa3 is not online. jocopa3
Joined: 26 May 2008
Total Posts: 2167
27 Jan 2009 05:45 PM
Exactly. The one that goes into the player was modified so bricks are seen on the player.
Report Abuse
jocopa3 is not online. jocopa3
Joined: 26 May 2008
Total Posts: 2167
27 Jan 2009 05:47 PM
Learn a little more will ya...
Also it is rare for a hopperbin to have a Brick in it but it is in plane tools. Also who would make a tool for a color tool?
Report Abuse
DingDong272 is not online. DingDong272
Top 100 Poster
Joined: 08 Dec 2007
Total Posts: 9860
27 Jan 2009 05:48 PM
Jocopa - Tools and Hopperbins are ENTIRELY different objects. A "brick" in one is not the only difference. They have entirely different events, functions, and one requires a Local GUI while the other doesn't.

Why don't YOU learn a little more.
Report Abuse
jocopa3 is not online. jocopa3
Joined: 26 May 2008
Total Posts: 2167
27 Jan 2009 05:53 PM
Pkay if you are so smart why does this work in a Hopperbin when this is an invaled script? HUH HUH HUH


a=script.Parent.Parent.Parent

function Simplify(pln,pla)
local c=a.Plane.PlaneFlyer:Open()
c.1(function):close()
end

function Simplify2(pln,pla)
local d=a.Plane.PlaneFlyer:Open()
d.2(function):close()
end
end

Don't know? It wokrs in ALL types of tool cause of the "a" finder. Also I learned computer launges from Binary Code to Javascript and a lot inbetween. I learned this stuff from SCHOOL where we use ROBLOX to help deminstrate these scripts. My scripting teacher does not even know why this works. So I guess there is a hole in the game that dis-obeys some laws of Lua.
Report Abuse
DingDong272 is not online. DingDong272
Top 100 Poster
Joined: 08 Dec 2007
Total Posts: 9860
27 Jan 2009 05:55 PM
You have given me no chance to figure that out, and that is not hard to figure out...

I'd also like to say that you are acting childish, and I will participate no further.
Report Abuse
jocopa3 is not online. jocopa3
Joined: 26 May 2008
Total Posts: 2167
27 Jan 2009 05:57 PM
>.>

You have not right to call me childish. Also I have given you a chance to figure it out. This script is almost like readng English. It is the most simplest script to read...
Report Abuse
mbruce0810 is not online. mbruce0810
Joined: 25 Jan 2008
Total Posts: 1560
27 Jan 2009 08:04 PM
I dont see how this is going to help me... I really need help. I rly dont see whats wrong, and its bugging me cuz this isnt working.
Report Abuse
Aidy6666 is not online. Aidy6666
Joined: 17 Sep 2007
Total Posts: 2930
27 Jan 2009 08:07 PM
LOL, this is the easiest script ever. I made one except instead it changed Velocity... that doesn't work. Obiousely.
Report Abuse
Aidy6666 is not online. Aidy6666
Joined: 17 Sep 2007
Total Posts: 2930
27 Jan 2009 08:07 PM
(I ment yurs)
Report Abuse
mbruce0810 is not online. mbruce0810
Joined: 25 Jan 2008
Total Posts: 1560
27 Jan 2009 08:08 PM
Umm then how can mine work. Its a local Gui, so if you think that all it does is change the colors then... >.>
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