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: I'm not understanding this

Previous Thread :: Next Thread 
michaelaqz4 is not online. michaelaqz4
Joined: 23 Sep 2009
Total Posts: 1940
03 Oct 2013 09:11 PM
Script
wait()
MouseIcon = "rbxasset://textures\\GunCursor.png"
Tool = script.Parent

Tool.Equipped:connect(function(Mouse)

Mouse.Icon = MouseIcon
print(Tool.Name .. " : Equipped")

Mouse.Button1Down:connect(function()
print(Tool.Name .. " : Button1Down")
end)

Mouse.Button2Down:connect(function()
print(Tool.Name .. " : Button2Down")
end)

end)

script.Parent.Unequipped:connect(function(Mouse)
print(Tool.Name .. " : Unequipped")
end)



Pretty basic, should print when the player clicks (Left or right) or selects and deselects the tool

This is the output
When I select the tool
Tool : Equipped

When I right click (Button1Down)
Tool : Button1Down

When I deselect the tool
Tool : Unequipped


Now heres the weird part
When I left click (Button2Down)
Tool : Button2Down
Tool : Button1Down

Anyone know whats wrong?
Report Abuse
Osyris is not online. Osyris
Joined: 27 Oct 2007
Total Posts: 4321
03 Oct 2013 09:29 PM
Before I dissect this, are you using a LocalScript?
Report Abuse
michaelaqz4 is not online. michaelaqz4
Joined: 23 Sep 2009
Total Posts: 1940
03 Oct 2013 09:31 PM
Yes.
Report Abuse
Osyris is not online. Osyris
Joined: 27 Oct 2007
Total Posts: 4321
03 Oct 2013 09:37 PM
I see what you mean. It appears to be ROBLOX's new right click menu within Studio. If you right click and drag (as to not bring up the menu) the Button1Down won't show.
Report Abuse
michaelaqz4 is not online. michaelaqz4
Joined: 23 Sep 2009
Total Posts: 1940
03 Oct 2013 09:42 PM
I feel pretty stupid now, thanks very much! xD
Report Abuse
Osyris is not online. Osyris
Joined: 27 Oct 2007
Total Posts: 4321
03 Oct 2013 09:45 PM
Not your fault, that menu is pretty buggy. The only use I get out of it is the 'Insert Part' bit, which I already made my own plugin to do so.
Report Abuse
michaelaqz4 is not online. michaelaqz4
Joined: 23 Sep 2009
Total Posts: 1940
03 Oct 2013 09:51 PM
I made this plugin

local PluginManagerObject = PluginManager()
local Plugin = PluginManagerObject:CreatePlugin()
local Toolbar = Plugin:CreateToolbar("Add ons")
local Button = Toolbar:CreateButton("", "New script", "Image.png")
Button.Click:connect(function()

NewScript = Instance.new("Script")
NewScript.Source = ""
if #game.Selection:Get() == 0 then
NewScript.Parent = Workspace
else
NewScript.Parent = game.Selection:Get()[1]
end

end)

And one for local scripts

And this (Sense theres no clicked blah blah it just runs when I open studio places)

Color = "Bright green"
for Loop = 1,100 do
if Workspace:FindFirstChild("BasePlate") == nil then
wait(0.03)
end
if Workspace:FindFirstChild("BasePlate") ~= nil then
Workspace.BasePlate.BrickColor = BrickColor.new(Color)
Workspace.BasePlate.Name = "Base"
end
end
Report Abuse
michaelaqz4 is not online. michaelaqz4
Joined: 23 Sep 2009
Total Posts: 1940
03 Oct 2013 09:52 PM
I also made some others like a CFrame plugin but those are really long (Mostly because of how poorly they were made)
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