|
| 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
|
  |
| Joined: 09 Jul 2012 |
| Total Posts: 2891 |
|
| |
|
|
| 06 Aug 2016 10:38 AM |
| returning it back to the humanoid after an intro sequence. |
|
|
| Report Abuse |
|
|
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
|
  |
| Joined: 09 Jul 2012 |
| Total Posts: 2891 |
|
| |
|
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
|
  |
| Joined: 09 Jul 2012 |
| Total Posts: 2891 |
|
|
| 06 Aug 2016 10:41 AM |
| Camera manipulation is my weakness so idk :/ |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| Joined: 09 Jul 2012 |
| Total Posts: 2891 |
|
|
| 06 Aug 2016 10:43 AM |
| And the subject was the Humanoid at first right? |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| Joined: 09 Jul 2012 |
| Total Posts: 2891 |
|
| |
|
| |
|
| |
|
| |
|
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 |
|
|