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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Script not working, Help

Previous Thread :: Next Thread 
sal212 is not online. sal212
Joined: 11 Apr 2010
Total Posts: 2929
21 Oct 2015 05:04 PM
function Click()
local camera = workspace.CurrentCamera
camera.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
end

script.Parent.MouseButton1Click:connect(Click)

It may not work because I also have another script that makes the camera circle around an object for my intro.
Report Abuse
HRnSN is not online. HRnSN
Joined: 22 Jun 2009
Total Posts: 1276
21 Oct 2015 05:07 PM
Show the other script?
Report Abuse
sal212 is not online. sal212
Joined: 11 Apr 2010
Total Posts: 2929
21 Oct 2015 05:15 PM
local target = workspace.CamPart
local camera = workspace.CurrentCamera
camera.CameraSubject = target
local angle = 0

local t = tick()
while true do
if tick()-t > 6.5 then
break
end
camera.CoordinateFrame = CFrame.new(target.Position) * CFrame.Angles(0, angle, 0) * CFrame.new(0, 0, -25)
angle = angle + math.rad(1.4)
wait()
end
Report Abuse
sal212 is not online. sal212
Joined: 11 Apr 2010
Total Posts: 2929
21 Oct 2015 05:25 PM
b
Report Abuse
sal212 is not online. sal212
Joined: 11 Apr 2010
Total Posts: 2929
21 Oct 2015 05:32 PM
b2
Report Abuse
HRnSN is not online. HRnSN
Joined: 22 Jun 2009
Total Posts: 1276
21 Oct 2015 05:35 PM
Is there an error or the camera just won't set the subject back to the humanoid?
Report Abuse
sal212 is not online. sal212
Joined: 11 Apr 2010
Total Posts: 2929
21 Oct 2015 05:36 PM
o, I got this error.

CurrentCamera is not a valid member of Camera
Report Abuse
sal212 is not online. sal212
Joined: 11 Apr 2010
Total Posts: 2929
21 Oct 2015 05:37 PM
Oh, duh. I had 2 CurrentCameras. I fixed it
Report Abuse
HRnSN is not online. HRnSN
Joined: 22 Jun 2009
Total Posts: 1276
21 Oct 2015 05:37 PM
function Click()
local camera = workspace.CurrentCamera
camera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
end
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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