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 » Scripters
Home Search
 

Re: How do you disable the right mouse button with a script?

Previous Thread :: Next Thread 
Stravan is not online. Stravan
Joined: 21 Dec 2009
Total Posts: 1337
22 Dec 2014 10:43 PM
You don't need to give me a script, but can you link a source to where I could find a way to do this? But if you could help me out with a script that'd be much appreciated >u<
Report Abuse
Stravan is not online. Stravan
Joined: 21 Dec 2009
Total Posts: 1337
22 Dec 2014 10:44 PM
b
Report Abuse
lolb3 is not online. lolb3
Joined: 16 Jan 2010
Total Posts: 2268
22 Dec 2014 10:45 PM
make a gui button the size of the screen or change the camera type
Report Abuse
jbjgang2 is not online. jbjgang2
Joined: 07 Feb 2010
Total Posts: 8948
22 Dec 2014 10:47 PM
Camera = workspace.CurrentCamera

Last_Pos = Camera.CoordinateFrame
Mouse.Button2Down:connect(function()
Right_Mouse_Up == false
repeat
wait()
Camera.CoordinateFrame = Last_Pos
until Right_Mouse_Up == true
end)

Mouse.Button2Down:connect(function()
Right_Mouse_Up = true
end)

Swaggin' Since Twenty Ten
Report Abuse
Argelius is not online. Argelius
Joined: 19 Jul 2010
Total Posts: 4047
22 Dec 2014 11:03 PM
GUI button the size of the screen would work better than method above, just make sure if you have a menu GUI or something it has a higher zindex
Report Abuse
dekkonot is not online. dekkonot
Joined: 22 Dec 2010
Total Posts: 6685
22 Dec 2014 11:08 PM
Alternatively, make a GUI that's Active property is true that follows the mouse around.

local player = game:GetService("Players").LocalPlayer
local mouse = player:GetMouse()
local frame = Instance.new("Frame", player.PlayerGui)
frame.BackgroundTransparency = 1

_G.rightMouseDisabled = true

mouse.Move:connect(function()
if _G.rightMouseDisabled then
frame.Position = UDim2.new(mouse.X-50, 0, mouse.Y-50)
end
end)
Report Abuse
Argelius is not online. Argelius
Joined: 19 Jul 2010
Total Posts: 4047
22 Dec 2014 11:14 PM
Also be aware that jbj is the only one who provided a solution that does not interfere with the Activated() event of Tool objects. If you are using gear in your game, any method is fine.
Report Abuse
Argelius is not online. Argelius
Joined: 19 Jul 2010
Total Posts: 4047
22 Dec 2014 11:15 PM
*not using gear
Report Abuse
Stravan is not online. Stravan
Joined: 21 Dec 2009
Total Posts: 1337
22 Dec 2014 11:21 PM
Well, all of your methods work with disabling the right mouse button. I need to make it so I can click a button so it sends the player to a different place in a universe. You'll know what I'm talking about if you go to this place

http://www.roblox.com/GunZ-The-Second-Duel-WIP-place?id=183840542
Report Abuse
dekkonot is not online. dekkonot
Joined: 22 Dec 2010
Total Posts: 6685
22 Dec 2014 11:48 PM
Disabling the right mouse button as in not being able to move the camera, or what? xP
Report Abuse
Stravan is not online. Stravan
Joined: 21 Dec 2009
Total Posts: 1337
23 Dec 2014 12:23 AM
Yeah that's what I need.
Report Abuse
Stravan is not online. Stravan
Joined: 21 Dec 2009
Total Posts: 1337
23 Dec 2014 12:48 AM
bumpy boo
Report Abuse
lolb3 is not online. lolb3
Joined: 16 Jan 2010
Total Posts: 2268
23 Dec 2014 11:17 AM
change the cameratype to scriptable
Report Abuse
Argelius is not online. Argelius
Joined: 19 Jul 2010
Total Posts: 4047
23 Dec 2014 12:09 PM
That would cause the camera to stop following the character
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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