generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Change camera to player ...

Previous Thread :: Next Thread 
jochem725 is not online. 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
FreeToTake is not online. FreeToTake
Joined: 21 Apr 2010
Total Posts: 1827
12 Nov 2012 12:23 PM
x = game.Workspace.CurrentCamera


x.Subject = monkey
Report Abuse
FASTIE is not online. 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 is not online. 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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image