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 » Game Design
Home Search
 

Re: How do you make a fixed camera position?

Previous Thread :: Next Thread 
IKeepItChallenging is not online. IKeepItChallenging
Joined: 06 Jun 2012
Total Posts: 530
02 Mar 2015 07:54 PM
I need the camera to stay in place when a player enters my game, no movement at all.
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
02 Mar 2015 07:59 PM
It requires two scripts.

A regular script in Workspace, and a localscript inside of it.
Should look like:

Script
LocalScript

Script's code is
game.Players.PlayerAdded:connect(function(player)
script.LocalScript:clone().Parent=player.CharacterAdded:wait()
end)

Localscript's code is
local time = 0 -- put your time in
local cam = workspace.CurrentCamera
wait(1)
cam.CameraType="Scriptable"
cam.CFrame=CFrame.new(0,0,0) -- This is the position the camera is positioned at.
cam.Focus=CFrame.new(0,0,0) --This is the position the camera looks at.
wait(time)
cam.CameraType="Follow"
cam.CameraSubject=workspace[game.Players.LocalPlayer.Name].Humanoid

You are welcome.
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
02 Mar 2015 08:07 PM
not how you use the camera

-- local script, place it in StarterGui

local cam = game.Workspace.CurrentCamera

local CameraLocation = Vector3.new(0,100,0) -- position the camera sits at

local CameraDirection = Vector3.new(0,0,0) -- position the camera looks at

cam.CameraType = Enum.CameraType.Scriptable

game["Run Service"].RenderStepped:connect(function()
cam.CoordinateFrame = CFrame.new(CameraLocation,CameraDirection)
end)

--
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
02 Mar 2015 08:13 PM
@chimmi
He said when a player enters his game.
And no movement at all.
I provided it for him.
It works.
Report Abuse
kingping259 is not online. kingping259
Joined: 09 Mar 2009
Total Posts: 275
02 Mar 2015 08:37 PM
@Blade,

You have obviously never scripted a camera before...

A camera script looks nothing like that gg
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
02 Mar 2015 08:52 PM
^
Report Abuse
IKeepItChallenging is not online. IKeepItChallenging
Joined: 06 Jun 2012
Total Posts: 530
03 Mar 2015 04:39 PM
Thank you both, even if one doesn't work, thanks for trying! I had no idea how to do that lol
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
07 Mar 2015 09:14 AM
fine but mine still works
even if it doesn't look good.
Report Abuse
dizzydude2 is not online. dizzydude2
Joined: 03 Mar 2013
Total Posts: 7717
02 Nov 2015 04:02 PM
This isn't that old, but it's old enough to hijack.

After you do the fixed camera position, how do you make the camera return to the player character on mouseclick? E.g., if you wanted to have a title screen with a fixed camera, but wanted the camera to be normal when they press play?

My current script looks like:

function onClicked()
title:Destroy()
cam.CameraType = Enum.CameraType.Fixed

With the function being called at:
button.MouseButton1Down:connect(onClicked).


What am I doing wrong here? Thanks in advance.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Game Design
   
 
   
  • 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