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 » Scripters
Home Search
 

Re: Why does this only work in solo?

Previous Thread :: Next Thread 
lordyoman is not online. lordyoman
Joined: 10 Jun 2010
Total Posts: 426
04 Nov 2011 09:00 PM
Why does this only work in solo? Its simple because i have NEVER done cameras before.


function onTouch(part)
cameraTarget = game.Workspace.cameraTarget
camera = game.Workspace.CurrentCamera
camera.CameraSubject = cameraTarget
end
script.Parent.Touched:connect(onTouch)
Report Abuse
lordyoman is not online. lordyoman
Joined: 10 Jun 2010
Total Posts: 426
04 Nov 2011 09:03 PM
Anyone? I really need some help with this.
Report Abuse
coplox is not online. coplox
Joined: 07 Jun 2008
Total Posts: 3252
04 Nov 2011 09:04 PM
Because when you use CurrentCamera in a Script, the Script become instantly shy of `#game.Players:GetPlayers()` being bigger than one.

And so it stops functioning.
Report Abuse
lordyoman is not online. lordyoman
Joined: 10 Jun 2010
Total Posts: 426
04 Nov 2011 09:06 PM
So how can i fix it?
Report Abuse
GigsD4X is not online. GigsD4X
Joined: 06 Jun 2008
Total Posts: 3794
04 Nov 2011 09:06 PM
^^ WHO ARE YOU?!?!?!T DSH9GFIWHETFWNHAEFNBIN AAAAAAAAAAHHHHHH

What is this cameraTarget you speak of and are you putting this in a Local Script?
Report Abuse
lordyoman is not online. lordyoman
Joined: 10 Jun 2010
Total Posts: 426
04 Nov 2011 09:07 PM
No its not a local script, Would that fix it?
Report Abuse
GigsD4X is not online. GigsD4X
Joined: 06 Jun 2008
Total Posts: 3794
04 Nov 2011 09:08 PM
If cameraTarget actually exists, yes it would.
Report Abuse
lordyoman is not online. lordyoman
Joined: 10 Jun 2010
Total Posts: 426
04 Nov 2011 09:08 PM
Oh and its targeting a part in the Workspace.
Report Abuse
coplox is not online. coplox
Joined: 07 Jun 2008
Total Posts: 3252
04 Nov 2011 09:09 PM
You need to schedule a counseling appointment for the Script to talk with the wiser CoreScript.

After that, wait about thirty minutes for the CoreScript to help the Script overcome shyness, then take the code from your Script, put it in a LocalScript and put that LocalScript in the StarterGui, then kill yourself.


The wisdom from the CoreScript will cure the Script's shyness and everything will return to normal.
Report Abuse
lordyoman is not online. lordyoman
Joined: 10 Jun 2010
Total Posts: 426
04 Nov 2011 09:09 PM
Dude, Are you on crack?!
Report Abuse
GigsD4X is not online. GigsD4X
Joined: 06 Jun 2008
Total Posts: 3794
04 Nov 2011 09:10 PM
Oh then yes it would work; however, LocalScripts have to be a in a player's backpack (or be a descendant of them), character model, or playerGui.
Report Abuse
GigsD4X is not online. GigsD4X
Joined: 06 Jun 2008
Total Posts: 3794
04 Nov 2011 09:11 PM
^^ Yes he is.
Report Abuse
lordyoman is not online. lordyoman
Joined: 10 Jun 2010
Total Posts: 426
04 Nov 2011 09:12 PM
So if i put this in a local script in my starter gui it would work?

function onTouch(part)
cameraTarget = game.Workspace.cameraTarget
camera = game.Workspace.CurrentCamera
camera.CameraSubject = cameraTarget
end
game.Workspace.Starter.Touched:connect(onTouch)
Report Abuse
coplox is not online. coplox
Joined: 07 Jun 2008
Total Posts: 3252
04 Nov 2011 09:13 PM
Your diagnosis is correct, I am stoned.
Report Abuse
GigsD4X is not online. GigsD4X
Joined: 06 Jun 2008
Total Posts: 3794
04 Nov 2011 09:14 PM
I believe so.
Report Abuse
lordyoman is not online. lordyoman
Joined: 10 Jun 2010
Total Posts: 426
04 Nov 2011 09:15 PM
Wow guys, I learned somthing today! You guys are great, one of you is on crack , and the forums are GREAT!
Report Abuse
coplox is not online. coplox
Joined: 07 Jun 2008
Total Posts: 3252
04 Nov 2011 09:15 PM
^ That is what I said, but, I troll-ified it.
Report Abuse
lordyoman is not online. lordyoman
Joined: 10 Jun 2010
Total Posts: 426
04 Nov 2011 09:17 PM
=3 So anyways i just tested it and it works =D!!! Now i can continue my Cut scene! Any advice for cut scenes?
Report Abuse
coplox is not online. coplox
Joined: 07 Jun 2008
Total Posts: 3252
04 Nov 2011 09:19 PM
You could use for loops to edit .CoordiateFrame?
Report Abuse
lordyoman is not online. lordyoman
Joined: 10 Jun 2010
Total Posts: 426
04 Nov 2011 09:19 PM
Yea, I think i will. Thanks guys im going to go work now!
Report Abuse
GigsD4X is not online. GigsD4X
Joined: 06 Jun 2008
Total Posts: 3794
04 Nov 2011 09:20 PM
^ what he said—tweening.

WHY AM I PARTICIPATING IN THIS THREAD EVEN THOUGH IT'S IN THE WRONG FORUM
*facepalm*
Report Abuse
lordyoman is not online. lordyoman
Joined: 10 Jun 2010
Total Posts: 426
04 Nov 2011 09:35 PM
Oh yea, Im sorry wrong forum... I wont do it again!
Report Abuse
XlegoX is not online. XlegoX
Joined: 16 Jun 2008
Total Posts: 14955
04 Nov 2011 11:17 PM
Think of it like this... when you're in online, how should the game know _which_ "CurrentCamera" you're talking about? Every player has their own CurrentCamrea, and obviously you don't mean all of the CurrentCameras.

The best way to do camera stuff is to have a localscript in the player which does the camera stuff, since that script will be local to that player's workspace, and get the correct currentcamera from that workspace.
Report Abuse
yoyoman2 is not online. yoyoman2
Joined: 07 Mar 2009
Total Posts: 2170
05 Nov 2011 04:17 AM
roblox dosent like to code correctly
Report Abuse
Nikolas5411 is not online. Nikolas5411
Joined: 03 Apr 2010
Total Posts: 2117
05 Nov 2011 06:00 AM
ROBLOX codes there games with inafishenitince. Duh.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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