jochem725
|
  |
| Joined: 02 Jan 2009 |
| Total Posts: 92 |
|
|
| 12 Nov 2012 12:16 PM |
Hello,
I have a command script, and I want to change the camera from the speaker to "toplayer". So when I say "Computer, connect me to MONKEY" I want to change my camerasubject to "MONKEY". I've already looked on the wiki but I couldn't find an answer..
Thanks, Jochem
if msg:match("Computer%p?.+connect me to%s.+") then local toplayer = msg:match("Computer%p?.+connect me to%s(.+)") if message and game.Players:findFirstChild(toplayer) ~= nil then
script.Parent.Output.Value = "Successfully connected camera to " .. toplayer else script.Parent.Output.Value = "Failed to connect to " .. toplayer end end |
|
|
| Report Abuse |
|
|
|
| 12 Nov 2012 12:23 PM |
x = game.Workspace.CurrentCamera
x.Subject = monkey |
|
|
| Report Abuse |
|
|
FASTIE
|
  |
| Joined: 02 Jul 2011 |
| Total Posts: 120 |
|
|
| 12 Nov 2012 12:51 PM |
Yeah, FreeToTake is right.
x = game.Workspace.CurrentCamera
x.Subject = monkey <--- (Insert name here) |
|
|
| Report Abuse |
|
|
MrChubbs
|
  |
| Joined: 14 Oct 2010 |
| Total Posts: 4969 |
|
|
| 12 Nov 2012 12:58 PM |
Don't insert the name insert an object value. x.Subject = workspace:findFirstChild(NameHere).Humanoid --[[If I understand the context correctly.]] |
|
|
| Report Abuse |
|
|
1Topcop
|
  |
| Joined: 09 Jun 2009 |
| Total Posts: 6635 |
|
|
| 12 Nov 2012 01:10 PM |
CameraSubject, not Subject. http://wiki.roblox.com/index.php/Camera |
|
|
| Report Abuse |
|
|