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: Problem with Birds' Eye View Camera Script

Previous Thread :: Next Thread 
Pikachu84639 is not online. Pikachu84639
Joined: 21 Nov 2011
Total Posts: 230
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
Pikachu84639 is not online. Pikachu84639
Joined: 21 Nov 2011
Total Posts: 230
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
Pikachu84639 is not online. Pikachu84639
Joined: 21 Nov 2011
Total Posts: 230
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
Pikachu84639 is not online. Pikachu84639
Joined: 21 Nov 2011
Total Posts: 230
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 is not online. 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 is not online. 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
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