GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
|
| 02 Oct 2012 12:05 PM |
How to change the positioning of the camera to brick named "CameraPos" and lock it to where you can't move the camera?
Sooo I went to the wiki... And found this:
game.Workspace.CurrentCamera.Focus = CFrame.new(game.Workspace.Part.Position)
I would change part to "CameraPos" to make the camera focus on that part?
(yes I know its a Local script)
So here is all that I got :l
while wait() do game.Workspace.CurrentCamera.Focus = CFrame.new(game.Workspace.CameraPos.Position) cam.CameraType = "Fixed" --guessing this will lock it...
|
|
|
| Report Abuse |
|
|
RoflBread
|
  |
| Joined: 18 Jun 2009 |
| Total Posts: 3803 |
|
| |
|
GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
|
| 02 Oct 2012 12:10 PM |
Noo... I forgot to put that in...
Correction:
cam = workspace.CurrentCamera
while wait() do game.Workspace.CurrentCamera.Focus = CFrame.new(game.Workspace.CameraPos.Position) cam.CameraType = "Fixed" --guessing this will lock it... |
|
|
| Report Abuse |
|
|
|
| 02 Oct 2012 12:12 PM |
I believe you may only change CFramed properties of a Camera, when said camera is Scriptable:
cam.CameraType = "Scriptable" |
|
|
| Report Abuse |
|
|
RoflBread
|
  |
| Joined: 18 Jun 2009 |
| Total Posts: 3803 |
|
|
| 02 Oct 2012 12:13 PM |
Ah : >
Erm...ummm...eeeee are player given the local script when they join (PlayerAdded) ? I know solo mode can mess that up, even if there is no errors. Not too sure other than that. |
|
|
| Report Abuse |
|
|
GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
|
| 02 Oct 2012 12:23 PM |
No, I was hoping I could just put this in the starterpack or startergui and it work... then I just remembered... That only works once...
PlayerAdded or PlayerRespawn which one do i need to use? |
|
|
| Report Abuse |
|
|
Oreology
|
  |
| Joined: 15 Sep 2012 |
| Total Posts: 507 |
|
|
| 02 Oct 2012 12:24 PM |
Just make it a localscript and put it into the starterpack.
☜▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬☞ |
|
|
| Report Abuse |
|
|
RoflBread
|
  |
| Joined: 18 Jun 2009 |
| Total Posts: 3803 |
|
|
| 02 Oct 2012 12:28 PM |
PlayerAdded CharacterAdded straight after
|
|
|
| Report Abuse |
|
|
GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
|
| 02 Oct 2012 10:22 PM |
Okay so here's what I got:
function PlayerAdded(player) wait()
cam = workspace.CurrentCamera
while wait() do game.Workspace.CurrentCamera.Focus = CFrame.new(game.Workspace.CameraPos.Position) cam.CameraType = "Fixed" --guessing this will lock it...
game.Players.PlayerAdded:connect() --what do i put here?
Do I do it right? Am I missing anything (Other then the connection line thingy) |
|
|
| Report Abuse |
|
|
GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
|
| 02 Oct 2012 10:52 PM |
| Oh and... where do I put this script? StaterPack or StarterGui? |
|
|
| Report Abuse |
|
|
GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
| |
|
GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
| |
|
|
| 03 Oct 2012 06:17 AM |
In the connection line you put a function in this case it is PlayerAdded so it will be: game.Players.PlayerAdded:connect(PlayerAdded) |
|
|
| Report Abuse |
|
|
|
| 03 Oct 2012 06:33 AM |
Put 'Script2' into 'Script1'. Disable 'Script2'. I'm on my iPhone so there might be a few minor errors.
Script2:
cam = workspace.CurrentCamera
game.Workspace.CurrentCamera.Focus = CFrame.new(game.Workspace.CameraPos.Position) cam.CameraType = "Scriptable"
Script1:
game.Players.PlayerAdded:connect(function(P) P.CharacterAdded:connect(function(C) local Cam = script.CHANGETHISTOSCRIPT2'sNAME local Clone = Cam:Clone().Parent = P.Playergui Clone.Disabled = false end) end) |
|
|
| Report Abuse |
|
|
|
| 03 Oct 2012 06:35 AM |
| Put the Script into Workspace, by the way. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 03 Oct 2012 07:19 AM |
| You can't put it in workspace |
|
|
| Report Abuse |
|
|
|
| 03 Oct 2012 07:24 AM |
| Step 1 click and hold on script. Step 2 drag it in Workspace. And look at what the scripts does before you say that. |
|
|
| Report Abuse |
|
|
GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
|
| 03 Oct 2012 07:25 AM |
Its a script that locks the camera VIA LocalScript, you cant put a local script in the workspace.
Unless this isn't a local.. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 03 Oct 2012 07:26 AM |
Step 3 You must have localscript to edit camera Step 4 Re Drag It and put it under startergear |
|
|
| Report Abuse |
|
|
|
| 03 Oct 2012 07:26 AM |
| Let me explain it to you. Script1 clones Script2 into the Playergui every time the player re-spawns. Script2 locks the camera. Know what you're talking about before you say something is wrong. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 03 Oct 2012 07:30 AM |
| DidYouKnowYouDon'tNeedCloning!!! |
|
|
| Report Abuse |
|
|
|
| 03 Oct 2012 07:32 AM |
| Sometimes, the LocalScript won't run unless it's Diabled the Enabled. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 03 Oct 2012 07:33 AM |
| Never! Unless you is be using a weird compuper |
|
|
| Report Abuse |
|
|
|
| 03 Oct 2012 07:38 AM |
| You don't know what you're talking about. Go away. Sometime the LocalScrit fires to early, that's why. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 03 Oct 2012 07:40 AM |
Isn't that what he wants? Make it like this:
game.Workspace.ChildAdded:connect(function(child) wait() if child == nil or child.Parent == nil then return end if game.Players:GetPlayerFromCharacter(child) == nil then return end --ThenCamera end) |
|
|
| Report Abuse |
|
|