|
| 04 Aug 2016 11:42 PM |
Been searching on roblox wiki for an hour now...
~The most desired of Robloxians |
|
|
| Report Abuse |
|
|
|
| 04 Aug 2016 11:45 PM |
To clarify I want the player's head to follow your mouse.
~The most desired of Robloxians |
|
|
| Report Abuse |
|
|
|
| 05 Aug 2016 01:14 AM |
Nobody can tell me?
~The most desired of Robloxians |
|
|
| Report Abuse |
|
|
gmatch
|
  |
| Joined: 21 May 2014 |
| Total Posts: 1173 |
|
|
| 05 Aug 2016 01:15 AM |
http://wiki.roblox.com/index.php?title=CFrame
idk
|
|
|
| Report Abuse |
|
|
|
| 05 Aug 2016 01:18 AM |
you're asking for something specific
http://wiki.roblox.com/index.php?title=API:Class/Mouse
you'll be able to get the mouse's position but to make the head cframe itself to look at it would be somewhat complicated
your mouse's is position is 2d and the head's position is 3d
|
|
|
| Report Abuse |
|
|
|
| 05 Aug 2016 01:19 AM |
Am I able to manipulate the torso's lookvector to face the mouse?
~The most desired of Robloxians |
|
|
| Report Abuse |
|
|
Kodran
|
  |
| Joined: 15 Aug 2013 |
| Total Posts: 5330 |
|
|
| 05 Aug 2016 01:20 AM |
If you provide two vector3 values when creating a cframe the first vector is the position, the second is where it's looking at. For example:
local p = Instance.new("Part", workspace) local plr = game.Players.LocalPlayer local m = plr:GetMouse() p.Anchored = true while wait() do p.CFrame = CFrame.new(p.CFrame.p, m.Hit.p) end |
|
|
| Report Abuse |
|
|
|
| 05 Aug 2016 01:21 AM |
^yes but when I did that, my body got all jerky and kept on tripping so don't do it
im a mlg |
|
|
| Report Abuse |
|
|
|
| 05 Aug 2016 01:31 AM |
Okay so I got this so far,
wait(0.5) local Mouse = game.Players.LocalPlayer:GetMouse() local Head = game.Workspace:FindFirstChild(game.Players.LocalPlayer.Name):WaitForChild("Head")
while true do wait() Head.CFrame = CFrame.new(Head.CFrame.p, Mouse.Hit.p) end
But in order to fix it from being so jerky how do I keep the head from changing the position that makes it look down or up?
~The most desired of Robloxians |
|
|
| Report Abuse |
|
|
|
| 05 Aug 2016 01:36 AM |
that is because you are using a while true which has a limit of wat ever wait you put in it use camera.Changed (it updates every time your camera changes)
im a mlg |
|
|
| Report Abuse |
|
|
|
| 05 Aug 2016 01:39 AM |
That's a lot better, but how would you keep the player from look down and up what you move your mouse?
sorry I'm still learning!
~The most desired of Robloxians |
|
|
| Report Abuse |
|
|