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 |
|
|
|
| 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
|
  |
| Joined: 20 Mar 2010 |
| Total Posts: 10 |
|
| |
|
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
|
  |
| 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 |
|
|
|
| 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
|
  |
| Joined: 20 Mar 2010 |
| Total Posts: 10 |
|
|
| 16 Jun 2013 06:49 AM |
Hmm Still does not work God dang it... |
|
|
| Report Abuse |
|
|
|
| 16 Jun 2013 07:24 AM |
| Why do you have it in a regular script? It must be in local. |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 16 Jun 2013 09:10 AM |
| You need a FOR loop in there somewhere... |
|
|
| Report Abuse |
|
|
miow22
|
  |
| Joined: 20 Mar 2010 |
| Total Posts: 10 |
|
| |
|