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
 

Re: Camera Manipulation

Previous Thread :: Next Thread 
MrVoxx is not online. 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 is not online. 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 is not online. 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
FisherPenguin is not online. FisherPenguin
Joined: 14 Jun 2010
Total Posts: 1157
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 is not online. 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 is not online. 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 is not online. MrVoxx
Joined: 24 Feb 2012
Total Posts: 37
02 Mar 2012 05:26 AM
Nevermind, I disnt see that forum. Thanks!
Report Abuse
MrVoxx is not online. MrVoxx
Joined: 24 Feb 2012
Total Posts: 37
02 Mar 2012 02:59 PM
Tried it, but it didn't work.
Report Abuse
MrVoxx is not online. MrVoxx
Joined: 24 Feb 2012
Total Posts: 37
02 Mar 2012 03:01 PM
Nevermind, got it to work :D
Thanks everyone!
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