iqbal1357
|
  |
| Joined: 16 Oct 2010 |
| Total Posts: 238 |
|
|
| 06 Jun 2015 09:26 PM |
How do I script so that the players torso always faces where the mouse is pointing?
I tried using this local script (in starter pack) but it's really glitchy
while wait() do game:GetService("UserInputService").MouseBehavior = Enum.MouseBehavior.LockCenter local player = game.Players.LocalPlayer local Mouse = player:GetMouse() Mouse.Move:connect(function() local char = player.Character local torso = char:WaitForChild("mTorso") torso.Middle.CFrame = CFrame.new(torso.Middle.CFrame.p, Mouse.Hit.p) end) end
I have a custom body welded to the players original body. The mTorso is a model in the body and the Middle is the actual brick that's being used as the torso.
I want it so that it's essentially like a forced mouse shift lock.
I'm trying to create a camera that's similar to those in Ignoble (http://www.roblox.com/games/140847226/Ignoble-Prototype-Free) and Strobe (http://www.roblox.com/games/142524131/Strobe-Read-Description)
If you want to see what I have so far to get a better idea of the problem, you can see here: http://www.roblox.com/games/54066817/Game
|
|
|
| Report Abuse |
|
|
iqbal1357
|
  |
| Joined: 16 Oct 2010 |
| Total Posts: 238 |
|
| |
|
iqbal1357
|
  |
| Joined: 16 Oct 2010 |
| Total Posts: 238 |
|
| |
|
iqbal1357
|
  |
| Joined: 16 Oct 2010 |
| Total Posts: 238 |
|
| |
|
|
| 07 Jun 2015 07:21 PM |
I don't think UIS is the best option here.
I think you should hook up a mousehover function then use the mouseHover.P and do some fancy math to get the torso rotated towards it. |
|
|
| Report Abuse |
|
|