Qivr
|
  |
| Joined: 22 Aug 2014 |
| Total Posts: 5407 |
|
|
| 12 Mar 2015 08:06 PM |
while wait() do local cam = game.Workspace.CurrentCamera if script.Parent.StartingFrame.Visible == true then cam.CameraType = "Scriptable" cam.CameraSubject = game.Players.LocalPlayer.Character cam.CoordinateFrame = game.Workspace.Lobby:WaitForChild("CamPart").CFrame else game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character game.Workspace.CurrentCamera.CameraType = "Custom" end end
it doesn't go back to the character once the GUI isn't visible anymore It's probably because of the cam.CoordinateFrame - but I don't know how that would be stated with the player? |
|
|
| Report Abuse |
|
|
|
| 12 Mar 2015 08:08 PM |
| game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid |
|
|
| Report Abuse |
|
|
Qivr
|
  |
| Joined: 22 Aug 2014 |
| Total Posts: 5407 |
|
| |
|
Sylverant
|
  |
| Joined: 11 Aug 2014 |
| Total Posts: 30 |
|
|
| 12 Mar 2015 08:12 PM |
| Are you getting anything specific in the output? |
|
|
| Report Abuse |
|
|
Qivr
|
  |
| Joined: 22 Aug 2014 |
| Total Posts: 5407 |
|
|
| 12 Mar 2015 08:13 PM |
| Nope, no output. Sorry, should've put that there to begin with. |
|
|
| Report Abuse |
|
|
Qivr
|
  |
| Joined: 22 Aug 2014 |
| Total Posts: 5407 |
|
|
| 12 Mar 2015 08:15 PM |
Should I do a Boolean Value instead? And just do
while wait() do if GUI.visible == true then value = true else value = false end end
and then just do
value.Changed:connect(function() if value.Value == true then --camstuff else --camstuff end end)
?? should i do it like that? |
|
|
| Report Abuse |
|
|
|
| 12 Mar 2015 08:17 PM |
| Can't you handle returning the camera in the script that is changing the gui's visibility? |
|
|
| Report Abuse |
|
|
Qivr
|
  |
| Joined: 22 Aug 2014 |
| Total Posts: 5407 |
|
|
| 12 Mar 2015 08:20 PM |
i could but i used separate scripts for separate buttons that all could change the visibility :/
I'll edit that and come back to you |
|
|
| Report Abuse |
|
|
Sylverant
|
  |
| Joined: 11 Aug 2014 |
| Total Posts: 30 |
|
|
| 12 Mar 2015 08:36 PM |
I used this and set up a mock version of what the scenario looked like. When the "StartingFrame" was no longer visible, the camera reverted to its original state. Try switching this out for what you have currently, and let me know if anything or nothing changes.
while wait() do local player = game.Players.LocalPlayer local cam = game.Workspace.CurrentCamera if script.Parent.StartingFrame.Visible == true then cam.CameraType = "Scriptable" cam.CameraSubject = player.Character.Humanoid cam.CoordinateFrame = game.Workspace.Lobby:WaitForChild("CamPart").CFrame else cam.CameraSubject = player.Character.Humanoid cam.CameraType = "Custom" end end |
|
|
| Report Abuse |
|
|