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: CameraSubject not set properly.

Previous Thread :: Next Thread 
LunaScripter is not online. LunaScripter
Joined: 27 Nov 2008
Total Posts: 813
14 Aug 2014 07:03 PM
Hey, I'm making an intro to a game, and use the following lines to change ones camera subject:

function setNewCameraTarget(target)
cam.CameraSubject = target
cam.CoordinateFrame = target.CFrame
end

cam.CameraType = Enum.CameraType.Scriptable

This works perfectly fine and does not need editing.
I then use this button, when clicked puts the camera back to normal:

script.Parent.MouseButton1Click:connect(function()
Load = player.Backpack.LoadCharacter
gui:Destroy()
Load.Disabled = false
workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Head
workspace.CurrentCamera.CameraType = Enum.CameraType.Track
end)

This also works, but when I respawn, my camera is no longer attached to my head. How would I go about fixing this? Thanks.
Report Abuse
zakarq is not online. zakarq
Joined: 10 Oct 2010
Total Posts: 883
14 Aug 2014 07:05 PM
When a player re spawns, you reset the camera?
Report Abuse
Blockerjr800th is not online. Blockerjr800th
Joined: 24 May 2010
Total Posts: 3175
14 Aug 2014 07:06 PM
.CharacterAdded event
Report Abuse
LunaScripter is not online. LunaScripter
Joined: 27 Nov 2008
Total Posts: 813
14 Aug 2014 07:08 PM
No, it respawns the character, fixes the camera. But when you reset again, the camera breaks.
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