|
| 15 Feb 2016 01:03 PM |
Hello, I've been trying to make a LocalScript in which the player's camera becomes Birds' Eye view.
local cameraHeight = 20
game:GetService("RunService").RenderStepped:connect(function() local p = game.Players.LocalPlayer local char = game.Players.LocalPlayer.Character local cam = game.Workspace.CurrentCamera p.CameraMaxZoomDistance = cameraHeight p.CameraMinZoomDistance = cameraHeight cam.CoordinateFrame = CFrame.new(char.Head.Position + Vector3.new(0,cameraHeight,0), char.Head.Position) end)
Unfortunately, it has not been working correctly. Here's the two issues I am having with this script: 1) I cannot move my Player with the WASD keys nor the arrow keys. It's just stuck. 2) The camera won't turn the direction the player is going. Therefore, it only follows the player, but never turns.
Please help me fix this script. I'd appreciate any help.
Thanks, Pikachu84639 • The answer to a math question is the question itself. Proof: 9+10 = 9+10 - Correct ✔ |
|
|
| Report Abuse |
|
|
|
| 15 Feb 2016 01:41 PM |
bumpity bump
Pikachu84639 • The answer to a math question is the question itself. Proof: 9+10 = 9+10 - Correct ✔ |
|
|
| Report Abuse |
|
|
|
| 15 Feb 2016 02:07 PM |
No reply?
Pikachu84639 • The answer to a math question is the question itself. Proof: 9+10 = 9+10 - Correct ✔ |
|
|
| Report Abuse |
|
|
|
| 15 Feb 2016 09:43 PM |
ugh...
Pikachu84639 • The answer to a math question is the question itself. Proof: 9+10 = 9+10 - Correct ✔ |
|
|
| Report Abuse |
|
|
Tynezz
|
  |
| Joined: 28 Apr 2014 |
| Total Posts: 4945 |
|
|
| 15 Feb 2016 09:47 PM |
Try this:
local cameraHeight = 20
game:GetService("RunService").RenderStepped:connect(function() local p = game.Players.LocalPlayer local char = game.Players.LocalPlayer.Character local cam = game.Workspace.CurrentCamera cam.CameraType="Scriptable" cam.CoordinateFrame = CFrame.new(char.Torso.Position + Vector3.new(0,cameraHeight,0), -math.pi/2) end)
|
|
|
| Report Abuse |
|
|
cxcharlie
|
  |
| Joined: 26 Aug 2009 |
| Total Posts: 1414 |
|
|
| 15 Feb 2016 10:31 PM |
The inherent problem is that you can't have a camera looking directly down or else there would be no relative directions of "left, right, front, or back"
http://www.roblox.com/a-item?id=212802893local D = Instance.new('RocketPropulsion',me) D.Target = OP D:Fire() |
|
|
| Report Abuse |
|
|