madmen27
|
  |
| Joined: 16 Feb 2014 |
| Total Posts: 15 |
|
|
| 26 Mar 2014 07:00 PM |
Alright I am using a script for manipulating camera. Since the wholel thing does not really matter I will give you the heads up. It involves many function and all functions execute nicely. Yet the Camera subject in setCamera() is not set on the char's humanoid. Its set on Default view Camera of studio. Is there are way to make this scriptable actually be attached to the player? I need the cameratype Scriptable since later on in the script I use Enums of SetRoll.
--* Setup *-- local player = game:GetService('Players').LocalPlayer; local char = player.Character; local workspace = game.Workspace; local cConnect = nil; local charisRunning = false;
--* Functions *--
function setCamera() --player.CameraMode = Enum.CameraMode.Classic player.CameraMode = Enum.CameraMode.LockFirstPerson workspace.CurrentCamera.CameraSubject = char.Humanoid workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable end |
|
|
| Report Abuse |
|
|
| |
|
|
| 26 Mar 2014 07:04 PM |
your doing it wrong it goes liek this
function(cameramaipulation) = true player.camera = manipulate = manipulate + 5 then if else = nil then mesage "no more" then if player.moves.forward or .backward or .sideways then player(kill)+5 = true nil then workspace.nil = false then wait (wiat 5 minutes) nil = true then nil = workspace.lightingclonefive.things.to.move.charamera = true then for _,v in pars is(camera) then camera.remove.replacewith(function(manipulation) end) end) end end end end end end
|
|
|
| Report Abuse |
|
|
madmen27
|
  |
| Joined: 16 Feb 2014 |
| Total Posts: 15 |
|
|
| 26 Mar 2014 07:07 PM |
Your code has errors.... -_-
Anyone can help me as I want to do minimal coding and just have a subject to be Humanoid on Scriptable camera? |
|
|
| Report Abuse |
|
|
|
| 26 Mar 2014 07:08 PM |
| I thought CameraSubject default was humanoid.. |
|
|
| Report Abuse |
|
|
madmen27
|
  |
| Joined: 16 Feb 2014 |
| Total Posts: 15 |
|
|
| 26 Mar 2014 07:10 PM |
| It is but using the Enum Scriptable disallows for it to actually follow the Humanoid like a DefaultCamera...I just need its focus to follow with first person mode of the character.... |
|
|
| Report Abuse |
|
|
|
| 26 Mar 2014 07:12 PM |
First person mode? Just use this
local cam = Workspace.CurrentCamera
cam.CameraMode = Enum.CameraMode.LockFirstPerson
It will put a player into FP mode and cannot zoom in/out |
|
|
| Report Abuse |
|
|
madmen27
|
  |
| Joined: 16 Feb 2014 |
| Total Posts: 15 |
|
|
| 26 Mar 2014 07:13 PM |
| No but I need the Camera on Scriptable since I have other functions in this script that need it that way such as :setRoll() |
|
|
| Report Abuse |
|
|
madmen27
|
  |
| Joined: 16 Feb 2014 |
| Total Posts: 15 |
|
|
| 26 Mar 2014 07:16 PM |
*sigh* wholescript....
Parent script:
--* Clone Script *-- game.Players.PlayerAdded:connect(function(p) p.CharacterAdded:connect(function(c) x = script:GetChildren() for i = 1, #x do x[i]:clone().Parent = c.Torso end end) end)
ChildScript:
--* Setup *-- local player = game:GetService('Players').LocalPlayer; local char = player.Character; local workspace = game.Workspace; local cConnect = nil; local charisRunning = false;
--* Functions *--
function setCamera() --player.CameraMode = Enum.CameraMode.Classic player.CameraMode = Enum.CameraMode.LockFirstPerson workspace.CurrentCamera.CameraSubject = char.Humanoid workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable end
function whileRunning() game.Workspace.CurrentCamera:SetRoll(0.01) wait(0.02) game.Workspace.CurrentCamera:SetRoll(0.02) wait(0.02) game.Workspace.CurrentCamera:SetRoll(0.03) wait(0.02) game.Workspace.CurrentCamera:SetRoll(0.04) wait(0.02) game.Workspace.CurrentCamera:SetRoll(0.05) wait(0.02) game.Workspace.CurrentCamera:SetRoll(0.06) wait(0.02) game.Workspace.CurrentCamera:SetRoll(0.07) wait(0.02) game.Workspace.CurrentCamera:SetRoll(0.08) wait(0.02) game.Workspace.CurrentCamera:SetRoll(0.09) wait(0.02) game.Workspace.CurrentCamera:SetRoll(0.1) wait(0.02) game.Workspace.CurrentCamera:SetRoll(-0.01) wait(0.02) game.Workspace.CurrentCamera:SetRoll(-0.02) wait(0.02) game.Workspace.CurrentCamera:SetRoll(-0.03) wait(0.02) game.Workspace.CurrentCamera:SetRoll(-0.04) wait(0.02) game.Workspace.CurrentCamera:SetRoll(-0.05) wait(0.02) game.Workspace.CurrentCamera:SetRoll(-0.06) wait(0.02) game.Workspace.CurrentCamera:SetRoll(-0.07) wait(0.02) game.Workspace.CurrentCamera:SetRoll(-0.08) wait(0.02) game.Workspace.CurrentCamera:SetRoll(-0.09) wait(0.02) game.Workspace.CurrentCamera:SetRoll(-0.1) wait(0.02) end
function isRunning() if charisRunning and char.Torso.Velocity.magnitude > 1 then return true end end
char.Humanoid.Jumping:connect(function() charisRunning = false; end)
function cRunning() setCamera() cConnect:disconnect(); charisRunning = true; while (isRunning()) do whileRunning() wait(0) end charisRunning = false; cConnect = char.Humanoid.Running:connect(cRunning); end
cConnect = char.Humanoid.Running:connect(cRunning); |
|
|
| Report Abuse |
|
|
madmen27
|
  |
| Joined: 16 Feb 2014 |
| Total Posts: 15 |
|
| |
|