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 » Scripters
Home Search
 

camera lock not working

Previous Thread :: Next Thread 
sentry3 is not online. sentry3
Joined: 01 May 2010
Total Posts: 538
08 Jul 2016 12:08 PM
game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(char)
local cam = workspace.CurrentCamera
while wait() do
if plr.PlayerGui.Start.Frame.Visible == true then
cam.CoordinateFrame = CFrame.new(46.4, 20.4, -120.5)
cam.Focus = CFrame.new(43.562, 16.426, -133.99)
else
cam.CameraSubject = char.Humanoid
end
end
end)
end)

--Ive read crazymans cam tutorial but fr some reason (this is in a localscript) this isnt working it just stays on the player and doesnt run it? tips?
Report Abuse
sentry3 is not online. sentry3
Joined: 01 May 2010
Total Posts: 538
08 Jul 2016 12:25 PM
bump
Report Abuse
Astrain1 is not online. Astrain1
Joined: 27 Mar 2013
Total Posts: 18697
08 Jul 2016 12:27 PM
cam.CameraType = "Scriptable"


jeb get me the seperatrons
Report Abuse
sentry3 is not online. sentry3
Joined: 01 May 2010
Total Posts: 538
08 Jul 2016 12:38 PM
didnt work

game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(char)
local cam = workspace.CurrentCamera
cam.CameraType = Enum.CameraType.Scriptable
while wait() do
if plr.PlayerGui.Start.Frame.Visible == true then
cam.CoordinateFrame = CFrame.new(46.4, 20.4, -120.5)
cam.Focus = CFrame.new(43.562, 16.426, -133.99)
else
cam.CameraSubject = char.Humanoid
cam.CameraType = Enum.CameraType.Follow
end
end
end)
end)
Report Abuse
sentry3 is not online. sentry3
Joined: 01 May 2010
Total Posts: 538
08 Jul 2016 01:06 PM
bump
Report Abuse
TheBenSquare is not online. TheBenSquare
Joined: 13 Dec 2009
Total Posts: 13604
08 Jul 2016 01:35 PM
If I remember correctly, you can't connect the PlayerAdded event from a local script. Along with that, I don't think you should use that for something like this anyway. Just scrap the PlayerAdded event and CharacterAdded event and then go ahead and connect a changed event to the GUI instead of using a loop along with whatever else.
Report Abuse
sentry3 is not online. sentry3
Joined: 01 May 2010
Total Posts: 538
08 Jul 2016 02:05 PM
@Ben i tried but i want it so when they join the camera is at a specifiedplace to make the press to play basically look more attractive but heres what i have now...

local plr = game.Players.LocalPlayer
local char = plr.Character
local cam = workspace.CurrentCamera
cam.CameraType = "Scriptable"
while wait() do
cam.CoordinateFrame = CFrame.new(46.4, 20.4, -120.5)
cam.Focus = CFrame.new(43.562, 16.426, -133.99)
plr.PlayerGui.Start.Frame.Visible.changed():connect(function()
cam.CameraSubject = char.Humanoid
cam.CameraType = Enum.CameraType.Follow
end)
end
Report Abuse
TheBenSquare is not online. TheBenSquare
Joined: 13 Dec 2009
Total Posts: 13604
08 Jul 2016 02:08 PM
if you don't know how to do that, take a look at this
http://wiki.roblox.com/index.php?title=Camera_manipulation
Report Abuse
sentry3 is not online. sentry3
Joined: 01 May 2010
Total Posts: 538
08 Jul 2016 02:15 PM
already lookedthrough that no help at all...
bump
Report Abuse
sentry3 is not online. sentry3
Joined: 01 May 2010
Total Posts: 538
08 Jul 2016 09:36 PM
bump
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