REM25
|
  |
| Joined: 28 Feb 2010 |
| Total Posts: 3154 |
|
|
| 22 Nov 2013 06:24 PM |
d = false function onclick() if d ~= false then return end d = true local Cam = game.Workspace.CurrentCamera local Humanoid = game.Players.Character.Humanoid Cam.CameraSubject = Humanoid Cam.CameraType = "Custom" d = false end
script.Parent.MouseButton1Down:connect(onclick) |
|
|
| Report Abuse |
|
|
|
| 22 Nov 2013 06:25 PM |
| game.Players.LocalPlayer.Character.Humanoid |
|
|
| Report Abuse |
|
|
Bebee2
|
  |
| Joined: 17 May 2009 |
| Total Posts: 3985 |
|
|
| 22 Nov 2013 06:26 PM |
-- Use a local script.
d = false function onclick() if d ~= false then return end d = true local Cam = game.Workspace.CurrentCamera local Humanoid = game.Players.LocalPlayer.Character.Humanoid --[[ Never defined the holder of the character.]] Cam.CameraSubject = Humanoid Cam.CameraType = "Custom" d = false end
script.Parent.MouseButton1Down:connect(onclick) |
|
|
| Report Abuse |
|
|
REM25
|
  |
| Joined: 28 Feb 2010 |
| Total Posts: 3154 |
|
|
| 22 Nov 2013 06:26 PM |
| wait what do you mean holder of character? |
|
|
| Report Abuse |
|
|
Bebee2
|
  |
| Joined: 17 May 2009 |
| Total Posts: 3985 |
|
|
| 22 Nov 2013 06:29 PM |
game.Players is a service.
game.Players.Character doesn't exist because the service doesn't have a character.
game.Players:WaitForChild'Bebee2'.Character exists since Bebee2 has a character... given that I actually am inside when the code is running. |
|
|
| Report Abuse |
|
|
REM25
|
  |
| Joined: 28 Feb 2010 |
| Total Posts: 3154 |
|
|
| 22 Nov 2013 06:29 PM |
| so I just add game.Players:WaitForChild() |
|
|
| Report Abuse |
|
|
| |
|
REM25
|
  |
| Joined: 28 Feb 2010 |
| Total Posts: 3154 |
|
|
| 22 Nov 2013 06:30 PM |
d = false function onclick() if d ~= false then return end d = true local Cam = game.Workspace.CurrentCamera local player = game.Players:WaitForChild() Cam.CameraSubject = player.Character.Humanoid Cam.CameraType = "Custom" d = false end
script.Parent.MouseButton1Down:connect(onclick) |
|
|
| Report Abuse |
|
|
|
| 22 Nov 2013 06:31 PM |
Like dis.
d = false function onclick() if d then return end d = true local Cam = game.Workspace.CurrentCamera local player = game.Players.LocalPlayer Cam.CameraSubject = player.Character.Humanoid Cam.CameraType = "Custom" d = false end
script.Parent.MouseButton1Down:connect(onclick) |
|
|
| Report Abuse |
|
|
Bebee2
|
  |
| Joined: 17 May 2009 |
| Total Posts: 3985 |
|
|
| 22 Nov 2013 06:31 PM |
| Go use the script I gave you. |
|
|
| Report Abuse |
|
|
REM25
|
  |
| Joined: 28 Feb 2010 |
| Total Posts: 3154 |
|
|
| 22 Nov 2013 06:34 PM |
| it doesn't work and Bebee2 what script? |
|
|
| Report Abuse |
|
|
|
| 22 Nov 2013 06:34 PM |
| http://www.roblox.com/Forum/ShowPost.aspx?PostID=118465032 Please help Me too |
|
|
| Report Abuse |
|
|
Bebee2
|
  |
| Joined: 17 May 2009 |
| Total Posts: 3985 |
|
|
| 22 Nov 2013 06:35 PM |
d = false function onclick() if script:IsA'LocalScript' then if d ~= false then return end d = true local Cam = game.Workspace.CurrentCamera local Humanoid = game.Players.LocalPlayer.Character.Humanoid Cam.CameraSubject = Humanoid Cam.CameraType = "Custom" d = false else print'You/'re not using a LocalScript.' end end
script.Parent.MouseButton1Down:connect(onclick)
|
|
|
| Report Abuse |
|
|
REM25
|
  |
| Joined: 28 Feb 2010 |
| Total Posts: 3154 |
|
|
| 22 Nov 2013 06:36 PM |
| Btw there is a red line on the print line... |
|
|
| Report Abuse |
|
|
REM25
|
  |
| Joined: 28 Feb 2010 |
| Total Posts: 3154 |
|
| |
|
Bebee2
|
  |
| Joined: 17 May 2009 |
| Total Posts: 3985 |
|
|
| 22 Nov 2013 06:40 PM |
d = false function onclick() if script:IsA'LocalScript' then if d ~= false then return end d = true local Cam = game.Workspace.CurrentCamera local Humanoid = game.Players.LocalPlayer.Character.Humanoid Cam.CameraSubject = Humanoid Cam.CameraType = "Custom" d = false else print'You\'re not using a LocalScript.' -- Oopsies. Wrong slash. end end
script.Parent.MouseButton1Down:connect(onclick)
|
|
|
| Report Abuse |
|
|
REM25
|
  |
| Joined: 28 Feb 2010 |
| Total Posts: 3154 |
|
| |
|
REM25
|
  |
| Joined: 28 Feb 2010 |
| Total Posts: 3154 |
|
|
| 22 Nov 2013 06:44 PM |
| This never works! DAYUMM!!!! |
|
|
| Report Abuse |
|
|
|
| 22 Nov 2013 06:45 PM |
I can help maybe, I just hold up let me get my script. |
|
|
| Report Abuse |
|
|
Bebee2
|
  |
| Joined: 17 May 2009 |
| Total Posts: 3985 |
|
|
| 22 Nov 2013 06:46 PM |
If the output prints "You're not using a LocalScript."
then you aren't using a local script and the script will fail.
It works perfectly fine for me. Just tested it, actually. |
|
|
| Report Abuse |
|
|
REM25
|
  |
| Joined: 28 Feb 2010 |
| Total Posts: 3154 |
|
| |
|
REM25
|
  |
| Joined: 28 Feb 2010 |
| Total Posts: 3154 |
|
|
| 22 Nov 2013 06:46 PM |
| Bebee it didnt print anything for me... |
|
|
| Report Abuse |
|
|
|
| 22 Nov 2013 06:47 PM |
Put this in a local gui!
wait(0.1) -- Wait time before starting the script or the script won't work. do workspace.CurrentCamera.CameraType = "Custom" end workspace.CurrentCamera.CameraSubject = script.Parent.Parent.Character.Humanoid --Goes in the character wait(0.1) do script.Remove() -- Removes script. end |
|
|
| Report Abuse |
|
|
REM25
|
  |
| Joined: 28 Feb 2010 |
| Total Posts: 3154 |
|
| |
|
REM25
|
  |
| Joined: 28 Feb 2010 |
| Total Posts: 3154 |
|
|
| 22 Nov 2013 06:49 PM |
| weird...now it works wtf... |
|
|
| Report Abuse |
|
|