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 » Scripting Helpers
Home Search
 

Camera Rotation stopping

Previous Thread :: Next Thread 
miow22 is not online. miow22
Joined: 20 Mar 2010
Total Posts: 10
15 Jun 2013 05:13 PM
I've made it so that my camera rotates at the start of the game
- When you press play it should stop rotating but it doesn't...

local button, state = script.Parent, false
button.MouseButton1Down:connect(function()
game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
game.Workspace.CurrentCamera.CameraType = "Custom"

camera.CoordinateFrame = CFrame.new(0, 0, 0)
end)
Report Abuse
ArbiterOfDeath is not online. ArbiterOfDeath
Joined: 20 Jun 2011
Total Posts: 1458
15 Jun 2013 05:35 PM
Is there another script rotating it? If so, then you will have to stop that script from running. Also, check out this page on CameraTypes:

http://wiki.roblox.com/index.php/CameraType_(Enum)

I suggest setting the CameraType to "Follow" or 4.
Report Abuse
miow22 is not online. miow22
Joined: 20 Mar 2010
Total Posts: 10
15 Jun 2013 05:43 PM
Thanks :p
Report Abuse
miow22 is not online. miow22
Joined: 20 Mar 2010
Total Posts: 10
15 Jun 2013 05:58 PM
local target = workspace.[OBJECT]
local camera = workspace.CurrentCamera
camera.CameraSubject = target
local angle = 0

while wait() do
camera.CoordinateFrame = CFrame.new(target.Position)
* CFrame.Angles(0, angle, 0)
* CFrame.new(0, 0, -60)
angle = angle + math.rad(1)

end

local player = localplayer
button = Instance.players.localplayer.Menu.Frame.Frame.Play
button.MouseButton1Down:connect(function()
currentcamera.CoordinateFrame = CFrame.new(target.Position)
* CFrame.new(0, 0, 0)
* CFrame.Angles(0, angle, 0)
end)

...Errr?
This is the normal script rotating the camera.
Report Abuse
miow22 is not online. miow22
Joined: 20 Mar 2010
Total Posts: 10
15 Jun 2013 06:24 PM
..I played the game via the actual play button, and none of this worked ._.
Report Abuse
ArbiterOfDeath is not online. ArbiterOfDeath
Joined: 20 Jun 2011
Total Posts: 1458
15 Jun 2013 06:53 PM
Here is how to fix it:

local target = workspace.[OBJECT]
local camera = workspace.CurrentCamera
camera.CameraSubject = target
local angle = 0
local Continue = true

while wait() and Continue do
camera.CoordinateFrame = CFrame.new(target.Position)
* CFrame.Angles(0, angle, 0)
* CFrame.new(0, 0, -60)
angle = angle + math.rad(1)

end

local player = localplayer
button = Instance.players.localplayer.Menu.Frame.Frame.Play
button.MouseButton1Down:connect(function()
currentcamera.CoordinateFrame = CFrame.new(target.Position)
* CFrame.new(0, 0, 0)
* CFrame.Angles(0, angle, 0)
Continue = false
end)
Report Abuse
miow22 is not online. miow22
Joined: 20 Mar 2010
Total Posts: 10
16 Jun 2013 06:49 AM
Hmm
Still does not work
God dang it...
Report Abuse
Lukekneenew is not online. Lukekneenew
Joined: 20 Oct 2009
Total Posts: 746
16 Jun 2013 07:24 AM
Why do you have it in a regular script? It must be in local.
Report Abuse
miow22 is not online. miow22
Joined: 20 Mar 2010
Total Posts: 10
16 Jun 2013 08:41 AM
I tried in local, still doesn't work for some reason...
Report Abuse
awesomedude739 is not online. awesomedude739
Joined: 24 Jun 2011
Total Posts: 143
16 Jun 2013 09:10 AM
You need a FOR loop in there somewhere...
Report Abuse
miow22 is not online. miow22
Joined: 20 Mar 2010
Total Posts: 10
21 Jun 2013 01:36 PM
"somewhere"...?
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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