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
 

Changing CameraSubject?

Previous Thread :: Next Thread 
tyele is not online. tyele
Joined: 03 Nov 2008
Total Posts: 320
21 Sep 2013 04:37 PM
Okay, so basically, I wanted to make it so after putting the CameraSubject on the part, the CameraSubject goes back to the humanoid. But since I changed it to part, I don't know what to type as the CameraSubject to make it go back to the Humanoid. Script: wait(3)
__________________________________________________
plr = game.Players.LocalPlayer
cam = game.Workspace.CurrentCamera
chr=nil

plr.CharacterAdded:connect(function(character)
chr=character
end)


wait()
cam.CameraType="Attach"
cam.FieldOfView = 20
cam.CameraSubject=game.Workspace.Part
wait(5)
cam.FieldOfView=70
cam.CameraSubject= what do I put here?
___________________________________________________________

Help?










Report Abuse
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
21 Sep 2013 04:40 PM
chr.Head?
Report Abuse
tyele is not online. tyele
Joined: 03 Nov 2008
Total Posts: 320
21 Sep 2013 04:43 PM
Doesn't work.
Report Abuse
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
21 Sep 2013 04:45 PM
Ohh right.
Attach it to the humanoid.
Report Abuse
tyele is not online. tyele
Joined: 03 Nov 2008
Total Posts: 320
21 Sep 2013 04:47 PM
Doesn't work. :/
Report Abuse
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
21 Sep 2013 04:49 PM
cam.CameraSubject = chr.Humanoid
Report Abuse
tyele is not online. tyele
Joined: 03 Nov 2008
Total Posts: 320
21 Sep 2013 04:49 PM
I know, thats what I tried.
Report Abuse
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
21 Sep 2013 04:50 PM
Is that the whole script?
plr.CharacterAdded:connect(function(character)
chr=character
end) -- You ended the function

--The stuff after will only run once
Report Abuse
Kirbykid02 is not online. Kirbykid02
Joined: 18 May 2009
Total Posts: 2671
21 Sep 2013 04:51 PM
plr = game.Players.LocalPlayer
cam = game.Workspace.CurrentCamera
chr=nil

plr.CharacterAdded:connect(function(character)
chr=character
wait()
cam.CameraType="Attach"
cam.FieldOfView = 20
cam.CameraSubject=game.Workspace.Part
wait(5)
cam.FieldOfView=70
cam.CameraSubject=chr.Humanoid
end)

Report Abuse
Kirbykid02 is not online. Kirbykid02
Joined: 18 May 2009
Total Posts: 2671
21 Sep 2013 04:52 PM
Wait.....put a local script in StarterGui with this :

wait(1)
chr = game.Players.LocalPlayer
cam = Workspace.CurrentCamera
wait()
cam.CameraType="Attach"
cam.FieldOfView = 20
cam.CameraSubject=game.Workspace.Part
wait(5)
cam.FieldOfView=70
cam.CameraSubject= chr.Humanoid
Report Abuse
tyele is not online. tyele
Joined: 03 Nov 2008
Total Posts: 320
21 Sep 2013 04:53 PM
Thanks guys! :D
Report Abuse
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
21 Sep 2013 04:54 PM
I assumed you did those parts right since you were asking for the last part.
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