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
 

Re: camera manipulation problem :p

Previous Thread :: Next Thread 
Qivr is not online. 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
Hunter4529 is not online. Hunter4529
Joined: 20 Oct 2013
Total Posts: 675
12 Mar 2015 08:08 PM
game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
Report Abuse
Qivr is not online. Qivr
Joined: 22 Aug 2014
Total Posts: 5407
12 Mar 2015 08:10 PM
it still doesn't work :/
Report Abuse
Sylverant is not online. 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 is not online. 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 is not online. 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
Hunter4529 is not online. Hunter4529
Joined: 20 Oct 2013
Total Posts: 675
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 is not online. 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 is not online. 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
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