MrVoxx
|
  |
| Joined: 24 Feb 2012 |
| Total Posts: 37 |
|
|
| 01 Mar 2012 06:33 PM |
I'm trying to make a script that rotates around the map when its at the menu.This isn't working. Here is my script game>Workspace>Script
if game.StarterGui.Menu.MenuFrame.Visible == true then while true do game.Workspace.CurrentCamera.CoordinateFrame = CFrame.new(10,50,30) game.Workspace.CurrentCamera.Focus = CFrame.new(0,10,10) wait()
end end
That part works, but I can't figure out how to get the camera to rotate or pan. Help? |
|
|
| Report Abuse |
|
|
lucas668
|
  |
| Joined: 18 Jun 2008 |
| Total Posts: 6183 |
|
|
| 01 Mar 2012 06:35 PM |
| Camera is local to each player. You need to put this in the gui in a local script, and you probably don't want to manipulate anything in the StarterGui because Roblox only clones that and puts it in players, nothing interacts with it. There is an object named "PlayerGui" that stores all Guis that get cloned by Roblox to the player. |
|
|
| Report Abuse |
|
|
MrVoxx
|
  |
| Joined: 24 Feb 2012 |
| Total Posts: 37 |
|
|
| 01 Mar 2012 06:44 PM |
Oops, sorry. Typo. It is in StarterPack as a LocalSript. I was looking at the wrong script xD
But thats the real code. |
|
|
| Report Abuse |
|
|
|
| 01 Mar 2012 08:53 PM |
No guarantees. But I think this is on the right path.
local c = game.Workspace.CurrentCamera.CoordinateFrame local f = game.Workspace.CurrentCamera.Focus
if game.StarterGui.Menu.MenuFrame.Visible == true then while true do if c = game.Workspace.CurrentCamera.CoordinateFrame then c = c.CFrame.new(c + 1) --Change this to how you want if f = game.Workspace.CurrentCamera.Focus then f = f.CFrame.new(f + 1) --Also change that to how you want wait() end end end end
+-Fishy |
|
|
| Report Abuse |
|
|
SDuke524
|
  |
| Joined: 29 Jul 2008 |
| Total Posts: 6267 |
|
|
| 01 Mar 2012 08:56 PM |
Guys, learn to read the wiki and search things before asking a question.
http://wiki.roblox.com/index.php/Camera_manipulation#Circling_the_part |
|
|
| Report Abuse |
|
|
MrVoxx
|
  |
| Joined: 24 Feb 2012 |
| Total Posts: 37 |
|
|
| 02 Mar 2012 05:23 AM |
| I have searche the wik. That didnt help. |
|
|
| Report Abuse |
|
|
MrVoxx
|
  |
| Joined: 24 Feb 2012 |
| Total Posts: 37 |
|
|
| 02 Mar 2012 05:26 AM |
| Nevermind, I disnt see that forum. Thanks! |
|
|
| Report Abuse |
|
|
MrVoxx
|
  |
| Joined: 24 Feb 2012 |
| Total Posts: 37 |
|
|
| 02 Mar 2012 02:59 PM |
| Tried it, but it didn't work. |
|
|
| Report Abuse |
|
|
MrVoxx
|
  |
| Joined: 24 Feb 2012 |
| Total Posts: 37 |
|
|
| 02 Mar 2012 03:01 PM |
Nevermind, got it to work :D Thanks everyone! |
|
|
| Report Abuse |
|
|