Seeumliam
|
  |
| Joined: 06 May 2013 |
| Total Posts: 5662 |
|
|
| 25 Sep 2014 05:16 PM |
so I read some on the wiki and made this what is wrong with it, it is in a local script inside startgui
local cam = game.Workspace.CurrentCamera while wait() do cam.Focus=game.Players.LocalPlayer.Character.Torso end |
|
|
| Report Abuse |
|
|
|
| 25 Sep 2014 05:23 PM |
Instead of
cam.Focus=game.Players.LocalPlayer.Character.Torso end
Use
cam.CurrentSubject = game.Players.LocalPlayer.Character.Torso |
|
|
| Report Abuse |
|
|
|
| 25 Sep 2014 05:24 PM |
| I have no idea exactly what you're trying to do. I would love to help if you would clarify on what you are trying to accomplish here. |
|
|
| Report Abuse |
|
|
Seeumliam
|
  |
| Joined: 06 May 2013 |
| Total Posts: 5662 |
|
|
| 25 Sep 2014 05:27 PM |
CurrentSubject is not a valid member of Camera
I am trying to get the camera to always face the player. |
|
|
| Report Abuse |
|
|
|
| 25 Sep 2014 05:32 PM |
Well to start with the basics the camera takes time to load in, so you'll need to yield.
repeat wait(.5) until Workspace.CurrentCamera
|
|
|
| Report Abuse |
|
|
|
| 25 Sep 2014 05:33 PM |
local cam = game.Workspace.CurrentCamera cam.CameraType = Enum.CameraType.Attach
Try that. |
|
|
| Report Abuse |
|
|
|
| 25 Sep 2014 05:34 PM |
| @Josh, No, the camera loads almost instantaniously, you never need a wait. |
|
|
| Report Abuse |
|
|
|
| 25 Sep 2014 05:36 PM |
| No it loads instantly in studio. This script will run before the camera or character is even created. |
|
|
| Report Abuse |
|
|
|
| 25 Sep 2014 05:37 PM |
http://www.roblox.com/Fixed-Kingping259s-Sword-Center-place?id=144380738
My game ^
Camera script has NO wait at all and works EVERY time.
> gg no re < |
|
|
| Report Abuse |
|
|
Seeumliam
|
  |
| Joined: 06 May 2013 |
| Total Posts: 5662 |
|
|
| 25 Sep 2014 05:39 PM |
| Thanks that made it so it focuses on player, but is there a way to make it so if you hold right click, it won't let your camera move? |
|
|
| Report Abuse |
|
|
|
| 25 Sep 2014 05:41 PM |
| @Seeumliam, It should not move since it's type is attach. |
|
|
| Report Abuse |
|
|
|
| 25 Sep 2014 05:44 PM |
If you don't want the camera to move just do something like
repeat wait(.5) until Workspace.CurrentCamera
local char = Workspace:WaitForChild(game.Players.LocalPlayer.Name) local cam = Workspace.CurrentCamera cam.CameraType = "Scriptable"
game:GetService("RunService").RenderStepped:connect(function() cam.CoordinateFrame = char.HumanoidRootPart.CFrame end) |
|
|
| Report Abuse |
|
|
Seeumliam
|
  |
| Joined: 06 May 2013 |
| Total Posts: 5662 |
|
|
| 25 Sep 2014 05:56 PM |
| The only problem with that is that I have another script that makes your view zoomed out so it should look down on the player. |
|
|
| Report Abuse |
|
|
|
| 25 Sep 2014 06:04 PM |
@kingping lol your camera isn't very smooth x) |
|
|
| Report Abuse |
|
|
|
| 25 Sep 2014 06:10 PM |
@xolb,
Yeah but if I made it smoother it would take about 30 seconds just to get through the spinning sequence... so I just kept it like that. |
|
|
| Report Abuse |
|
|
|
| 25 Sep 2014 06:11 PM |
lol no you clearly don't know what interpolation is :) |
|
|
| Report Abuse |
|
|
|
| 25 Sep 2014 06:14 PM |
| @xolb, I don't experiment with camera's much since I never use them, but Seeumliam's problem was simple, so I just answered his and moved on. 8) |
|
|
| Report Abuse |
|
|
|
| 26 Sep 2014 03:24 PM |
Smooth camera here o3o http://www.roblox.com/--place?id=179419478 |
|
|
| Report Abuse |
|
|