|
| 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
|
  |
| Joined: 27 Oct 2007 |
| Total Posts: 4321 |
|
|
| 03 Oct 2013 09:29 PM |
| Before I dissect this, are you using a LocalScript? |
|
|
| Report Abuse |
|
|
| |
|
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 |
|
|
|
| 03 Oct 2013 09:42 PM |
| I feel pretty stupid now, thanks very much! xD |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|