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: Locking mouse in place

Previous Thread :: Next Thread 
ToboboT is not online. ToboboT
Joined: 25 Jun 2011
Total Posts: 2385
14 Feb 2014 08:01 AM
Say I want the mouse to always be in the middle of the screen plus an extra 70 pixels to the right. How would I do this?

this is my script so far. of course it is horrible but is there some method to set your mouse somewhere or something??

mouse.X = mouse.ViewSizeX/2
Report Abuse
ToboboT is not online. ToboboT
Joined: 25 Jun 2011
Total Posts: 2385
14 Feb 2014 01:12 PM
bumb and sorry here is the full script:

local player = game.Players.LocalPlayer
local mouse = player:GetMouse()

while wait() do
mouse.X = (mouse.ViewSizeX/2) + 70
mouse.Y = mouse.ViewSizeY/2
end
Report Abuse
L0cky2013 is not online. L0cky2013
Joined: 30 Jul 2012
Total Posts: 1446
14 Feb 2014 01:31 PM
You are not allowed to set it.
Report Abuse
MHebes is not online. MHebes
Joined: 04 Jan 2013
Total Posts: 2278
14 Feb 2014 02:04 PM
Yeah, we wish you could. Best you can do is set the Player's CameraMode to LockFirstPerson and do some fancy things with welds to make it 3rd person, maybe.
Report Abuse
dodleman is not online. dodleman
Joined: 22 Dec 2007
Total Posts: 1118
14 Feb 2014 02:28 PM
You can't move the mouse via script because if you could, you could force people to buy things in game.
Report Abuse
ToboboT is not online. ToboboT
Joined: 25 Jun 2011
Total Posts: 2385
14 Feb 2014 02:38 PM
oh :/

so, about that welding. should I set the person's cameramode to lfs then set the currentcamera cameratype to scritpable? and then work with it?
Report Abuse
ToboboT is not online. ToboboT
Joined: 25 Jun 2011
Total Posts: 2385
14 Feb 2014 02:52 PM
bump
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
14 Feb 2014 02:59 PM
No
Report Abuse
MHebes is not online. MHebes
Joined: 04 Jan 2013
Total Posts: 2278
14 Feb 2014 07:59 PM
Well the way I made a third person mode once was by setting to lfp and then moving the neck weld so the head was back and to the right (so you're looking over the shoulder) and set it to transparent and make a new fake head.
Report Abuse
ToboboT is not online. ToboboT
Joined: 25 Jun 2011
Total Posts: 2385
15 Feb 2014 11:29 AM
@MHebes but then you wouldn't be able to see the character's body
Report Abuse
L0cky2013 is not online. L0cky2013
Joined: 30 Jul 2012
Total Posts: 1446
15 Feb 2014 12:01 PM
Set mouse icon to a blank image then make a gui in the middle of the screen with a cursor. /logic
Report Abuse
secretidagent is not online. secretidagent
Joined: 07 Nov 2010
Total Posts: 1600
15 Feb 2014 12:10 PM
I like l0cky2013's idea.
Report Abuse
ToboboT is not online. ToboboT
Joined: 25 Jun 2011
Total Posts: 2385
15 Feb 2014 12:18 PM
no i want the cursor to be able to stay in that place and when you move it it moves the character as well
Report Abuse
L0cky2013 is not online. L0cky2013
Joined: 30 Jul 2012
Total Posts: 1446
15 Feb 2014 12:26 PM
So basically what you want is mouselockswitch?
Report Abuse
ToboboT is not online. ToboboT
Joined: 25 Jun 2011
Total Posts: 2385
15 Feb 2014 12:29 PM
ya
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
15 Feb 2014 04:21 PM
I don't think you can...
Report Abuse
ToboboT is not online. ToboboT
Joined: 25 Jun 2011
Total Posts: 2385
16 Feb 2014 10:16 AM
well I got it to work :/ if you want to see it, its in my places
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