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: Follow Mouse - Help -

Previous Thread :: Next Thread 
CrixusOdalisManiatus is not online. CrixusOdalisManiatus
Joined: 16 Jun 2011
Total Posts: 5987
22 Aug 2016 03:02 AM
Trying to make it so that you can control the movement of a multiple-part-model with just the mouse.

I tried doing BodyVelocity, BodyGyro, and BodyAngularVelocity and BodyGyro didn't do anything, BodyAngularVelocity just rotated it but didn't make it follow, and BodyVelocity followed it BUT could only follow in one path, it wouldn't follow in X and Z, it'd just stay with X, sometimes glitch and go up or down but it doesn't follow the mouse like i want it to.


--Example of trying BodyGyro--
ch = plr.Character
b = ch.Beyblade
g = b.Damage
Mouse = plr:GetMouse()

Mouse.Move:connect(function()
print(b.NoTip.BodyGyro.CFrame)
b.NoTip.BodyGyro.CFrame = (CFrame.new(Mouse.Hit.p.X,0,0))
end)

--Example of trying BodyVelocity--
plr = game.Players.LocalPlayer
ch = plr.Character
b = ch.Beyblade
g = b.Damage
Mouse = plr:GetMouse()

Mouse.Move:connect(function()
b.Control.Velocity2.Velocity = (Vector3.new(Mouse.Hit.p.X, Mouse.Hit.p.Y, 0))
end)
Report Abuse
ServerDaddy is not online. ServerDaddy
Joined: 23 Aug 2015
Total Posts: 15857
22 Aug 2016 03:04 AM
redo it .
Report Abuse
CrixusOdalisManiatus is not online. CrixusOdalisManiatus
Joined: 16 Jun 2011
Total Posts: 5987
22 Aug 2016 03:11 AM
wat
Report Abuse
ServerDaddy is not online. ServerDaddy
Joined: 23 Aug 2015
Total Posts: 15857
22 Aug 2016 03:16 AM
increase it .
Report Abuse
ServerDaddy is not online. ServerDaddy
Joined: 23 Aug 2015
Total Posts: 15857
22 Aug 2016 03:25 AM
increase it .
Report Abuse
CrixusOdalisManiatus is not online. CrixusOdalisManiatus
Joined: 16 Jun 2011
Total Posts: 5987
22 Aug 2016 03:28 AM
like Mouse.Hit.p.X + 10?
The X moves just fine rn, but Y and Z don't.

b.Control.Velocity2.Velocity = (Vector3.new(Mouse.Hit.p.X, 0, Mouse.Hit.p.Z + .1))
causes it to go up and up and up forever and ever
goes out of range immidiately (field of view), then falls off the map lol.



b.Control.Velocity2.Velocity = (Vector3.new(Mouse.Hit.p.X, 0, Mouse.Hit.p.Z)) does basically the same thing but has a litte more control but i have to change the camera which is bad.


Atm I use a camera that is stuck at an angle, viewing an arena, I want it to where the object follows the cursor smoothly
Report Abuse
CrixusOdalisManiatus is not online. CrixusOdalisManiatus
Joined: 16 Jun 2011
Total Posts: 5987
22 Aug 2016 03:40 AM
Atm I have it to where if I change the camera mode, it will follow the mouse but the mouse has to be on the other side of the map for it to move in that direction, so the controlling is a bit off?

also, i need the camera to be in Scriptable, not Custom, it seems to work best in custom (only goes to the left top corner if i do Scriptable)
Report Abuse
pullman45 is not online. pullman45
Joined: 09 Jul 2012
Total Posts: 2891
22 Aug 2016 05:55 AM
I have a working script for just that.

The script makes the player follow the mouse while the right button is being held and the character adjusts its speed according to how far the mouse is from the player (inspired by DS LoZ games).
Report Abuse
pullman45 is not online. pullman45
Joined: 09 Jul 2012
Total Posts: 2891
22 Aug 2016 05:55 AM
But it was for the character and not models.

Derp
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