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: Returning the camera?

Previous Thread :: Next Thread 
Triumphion is not online. Triumphion
Joined: 28 Jun 2011
Total Posts: 3074
06 Aug 2016 10:36 AM
I have a script that injects this script in to the character model, all that works fine, but when I try returning control to the player, it doesn't let me move the camera around.

wait(0.3)
local cam = workspace.CurrentCamera
local character = script.Parent
local camera = game.Workspace[character.Name .. " Camera"]
local angle = 180
cam.CameraType = "Scriptable"
local i = 0
while wait() do
cam.CoordinateFrame = CFrame.new(camera.Position)
* CFrame.Angles(0, math.rad(angle), 0)
i = i + 1
print(i)
if i > 400 then break end
end
cam.CameraType = "Custom"
cam.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
cam.CoordinateFrame = CFrame.new(character:FindFirstChild("Head").Position)

print(cam.CameraType)
print(cam.CameraSubject.Name)


(by the way the prints at the end were for testing purpouses)
Report Abuse
pullman45 is not online. pullman45
Joined: 09 Jul 2012
Total Posts: 2891
06 Aug 2016 10:37 AM
Returning how?
Report Abuse
Triumphion is not online. Triumphion
Joined: 28 Jun 2011
Total Posts: 3074
06 Aug 2016 10:38 AM
returning it back to the humanoid after an intro sequence.
Report Abuse
pullman45 is not online. pullman45
Joined: 09 Jul 2012
Total Posts: 2891
06 Aug 2016 10:39 AM
I'm not too sure if this is the problem, but in a function, when you return something the function stops.
Report Abuse
pullman45 is not online. pullman45
Joined: 09 Jul 2012
Total Posts: 2891
06 Aug 2016 10:39 AM
Oops no.
Report Abuse
pullman45 is not online. pullman45
Joined: 09 Jul 2012
Total Posts: 2891
06 Aug 2016 10:40 AM
Alright, so you inject it right, then when it finishes, you put it back into Humanoid. But after you inject it again, it doesn't work.

Is that the case?
Report Abuse
pullman45 is not online. pullman45
Joined: 09 Jul 2012
Total Posts: 2891
06 Aug 2016 10:41 AM
Camera manipulation is my weakness so idk :/
Report Abuse
Triumphion is not online. Triumphion
Joined: 28 Jun 2011
Total Posts: 3074
06 Aug 2016 10:42 AM
my issue is, it injects in the character model no problem so I can change the camera subject, but when I try and return the camera subject back to the humanoid, it puts the camera literally inside the head and I cant move it around.
Report Abuse
pullman45 is not online. pullman45
Joined: 09 Jul 2012
Total Posts: 2891
06 Aug 2016 10:43 AM
And the subject was the Humanoid at first right?
Report Abuse
Triumphion is not online. Triumphion
Joined: 28 Jun 2011
Total Posts: 3074
06 Aug 2016 10:45 AM
no, at the beginning the subject was a part that has the players name on it(I have a script in the game that generates a part with their name so that I can manipulate the intro easier)
Report Abuse
pullman45 is not online. pullman45
Joined: 09 Jul 2012
Total Posts: 2891
06 Aug 2016 10:49 AM
Do you need to switch the subject?

Man I don't know...
Report Abuse
Triumphion is not online. Triumphion
Joined: 28 Jun 2011
Total Posts: 3074
06 Aug 2016 10:57 AM
yes I need to switch the subject back to the player (as seen after the while wait() do loop)
Report Abuse
pullman45 is not online. pullman45
Joined: 09 Jul 2012
Total Posts: 2891
06 Aug 2016 10:59 AM
I'm stuck here.
Report Abuse
Triumphion is not online. Triumphion
Joined: 28 Jun 2011
Total Posts: 3074
06 Aug 2016 11:02 AM
anyone else able to help?
Report Abuse
Triumphion is not online. Triumphion
Joined: 28 Jun 2011
Total Posts: 3074
06 Aug 2016 11:18 AM
bump
Report Abuse
Triumphion is not online. Triumphion
Joined: 28 Jun 2011
Total Posts: 3074
06 Aug 2016 11:22 AM
bump^3
Report Abuse
pullman45 is not online. pullman45
Joined: 09 Jul 2012
Total Posts: 2891
06 Aug 2016 11:29 AM
Try reposting and see if you get a good answer if you haven't already.
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