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: Recreating what MouseLock does - How does it work?

Previous Thread :: Next Thread 
SilentSwords is not online. SilentSwords
Joined: 22 Jun 2007
Total Posts: 27214
07 Mar 2013 09:01 AM
You must all know the option MouseLock, where your character gets attached to what I think is a part with a force that keeps it faced forward.

I'm trying to recreate this but I'm not having much luck so far. I'm thinking it's something only the client can do and us users are limited to or that I'm approaching it wrong.

What I do is basically weld a 1x1x1 invisible part to the Torso of a character, give it a BodyGyro with stats

D=300
P=5000
maxTorque=0,100000,0

and then loop it to make the character target a certain part.

Basically:

while wait() do
bg.cframe=CFrame.new(chr.Torso.Position, target.Position)
end

This works PRETTY well however it's proving to be rather unstable for the character, resulting in a lot of flipping and weird movements sometimes.

So that's why I think it might be something Roblox itself can only do and we can't. But maybe that isn't the case. What are your thoughts or do you guys have any idea on how to recreate the effects of mouselock?

-{===>SS
Report Abuse
ChuckTestaDotAvi is not online. ChuckTestaDotAvi
Joined: 03 Sep 2012
Total Posts: 439
07 Mar 2013 09:10 AM
Wouldn't welding be much easier?
Report Abuse
SilentSwords is not online. SilentSwords
Joined: 22 Jun 2007
Total Posts: 27214
07 Mar 2013 09:10 AM
What do you mean precisely?

-{===>SS
Report Abuse
ChuckTestaDotAvi is not online. ChuckTestaDotAvi
Joined: 03 Sep 2012
Total Posts: 439
07 Mar 2013 09:20 AM
Weld a block near you?
Report Abuse
SilentSwords is not online. SilentSwords
Joined: 22 Jun 2007
Total Posts: 27214
07 Mar 2013 09:21 AM
I don't see how that will help me target a certain part?

-{===>SS
Report Abuse
ChuckTestaDotAvi is not online. ChuckTestaDotAvi
Joined: 03 Sep 2012
Total Posts: 439
07 Mar 2013 09:42 AM
Instance.new("Weld")

not

part.TopSurface = "Weld"
Report Abuse
leates is not online. leates
Joined: 16 Jan 2009
Total Posts: 5650
07 Mar 2013 10:44 AM
Is the brick's CanCollide property off?
Report Abuse
SilentSwords is not online. SilentSwords
Joined: 22 Jun 2007
Total Posts: 27214
07 Mar 2013 03:10 PM
I'm already welding it by using welds.. and yes its cancollide is false.

-{===>SS
Report Abuse
DarkWhirlwind is not online. DarkWhirlwind
Joined: 15 Sep 2012
Total Posts: 96
28 Aug 2013 03:17 PM
Use mouse.Hit instead of a weld
Report Abuse
Kirbykid02 is not online. Kirbykid02
Joined: 18 May 2009
Total Posts: 2671
28 Aug 2013 03:22 PM
http://www.roblox.com/3rd-Person-Camera-Test-place?id=126065373

This was my my attempt to recreate it. If you want it you can have it.
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