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: works only in solo?

Previous Thread :: Next Thread 
randomsmileyface is not online. randomsmileyface
Joined: 01 Aug 2010
Total Posts: 4538
05 Oct 2013 11:22 AM
this is a camera script. It is a local script. it is set inside of a gui that goes into starter gui eventually.
for some reason this only works in solo. I thought I got the specifications right.

script.Parent.Modelsubject.Changed:connect(function()
local cam = game.Workspace.CurrentCamera -- Finds the camera of the Local Player
if script.Parent.Modelsubject.Value == "End" then
game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
game.Workspace.CurrentCamera.CameraType = "Custom"
else
local modelsubject = game.Workspace:FindFirstChild(script.Parent.Modelsubject.Value)
cam.CameraSubject = modelsubject.Camerapart
cam.CameraType = "Scriptable"
cam.CoordinateFrame = modelsubject.CameraCFrame.CFrame
cam.Focus = modelsubject.Camerapart.CFrame
end
end)
Report Abuse
juzzbyXfalcon is not online. juzzbyXfalcon
Joined: 02 Feb 2011
Total Posts: 1311
05 Oct 2013 11:24 AM
Is this in a local script?

-Believe and you will achieve-
Report Abuse
randomsmileyface is not online. randomsmileyface
Joined: 01 Aug 2010
Total Posts: 4538
05 Oct 2013 11:25 AM
yes
Report Abuse
juzzbyXfalcon is not online. juzzbyXfalcon
Joined: 02 Feb 2011
Total Posts: 1311
05 Oct 2013 11:31 AM
Oh, a scriptable camera can't use focus. Set the rotation in the CFrame value instead.

Also, setting a camerasubject overrides focus (but still doesn't work with a scriptable camera, possibly for that reason.)

-Believe and you will achieve-
Report Abuse
randomsmileyface is not online. randomsmileyface
Joined: 01 Aug 2010
Total Posts: 4538
05 Oct 2013 11:36 AM
that cut back on unessasary things, but it still only works in solo
Report Abuse
randomsmileyface is not online. randomsmileyface
Joined: 01 Aug 2010
Total Posts: 4538
05 Oct 2013 11:42 AM
if you need more info,
the script starts out as a descendant of a screengui in lighting, disabled
then once moved to the player's Gui (not startergui)
it is enabled
Report Abuse
juzzbyXfalcon is not online. juzzbyXfalcon
Joined: 02 Feb 2011
Total Posts: 1311
05 Oct 2013 11:44 AM
What enables it though. Does that script functions properly in online mode?

Solo mode is practically online mode, only all the scripts function as local scripts.

-Believe and you will achieve-
Report Abuse
randomsmileyface is not online. randomsmileyface
Joined: 01 Aug 2010
Total Posts: 4538
05 Oct 2013 11:45 AM
a normal script in a part of a model.
it makes a copy of the local script,
then moves it
Report Abuse
juzzbyXfalcon is not online. juzzbyXfalcon
Joined: 02 Feb 2011
Total Posts: 1311
05 Oct 2013 11:46 AM
I have no idea then. Sounds like a logic problem.

-Believe and you will achieve-
Report Abuse
randomsmileyface is not online. randomsmileyface
Joined: 01 Aug 2010
Total Posts: 4538
05 Oct 2013 11:48 AM
time to bring out those professor Layton puzzles
Report Abuse
juzzbyXfalcon is not online. juzzbyXfalcon
Joined: 02 Feb 2011
Total Posts: 1311
05 Oct 2013 11:49 AM
Yeah, just try to script it in a different way.

-Believe and you will achieve-
Report Abuse
randomsmileyface is not online. randomsmileyface
Joined: 01 Aug 2010
Total Posts: 4538
05 Oct 2013 11:59 AM
I'm not sure I know of a different way, rather than reformatting the function

anyways if you want to see what I am trying to make the script for its here

http://www.roblox.com/talk-to-an-NPC-place?id=131674912
Report Abuse
juzzbyXfalcon is not online. juzzbyXfalcon
Joined: 02 Feb 2011
Total Posts: 1311
05 Oct 2013 12:07 PM
Well, that didn't tell me much :p

Maaaybe if you'd try to insert the remote error monitoring system?

-Believe and you will achieve-
Report Abuse
randomsmileyface is not online. randomsmileyface
Joined: 01 Aug 2010
Total Posts: 4538
05 Oct 2013 12:16 PM
I just used that,
my script has gone insane.

It is now saying that the string, Modelsubject, is not a valid member of ScreenGui
Report Abuse
randomsmileyface is not online. randomsmileyface
Joined: 01 Aug 2010
Total Posts: 4538
05 Oct 2013 12:34 PM
and another script at the same time says it is a valid member

and there are no errors like that in play solo
Report Abuse
randomsmileyface is not online. randomsmileyface
Joined: 01 Aug 2010
Total Posts: 4538
05 Oct 2013 12:40 PM
WHY DO SCRIPTS MALFUNCTION LIKE THIS
Report Abuse
juzzbyXfalcon is not online. juzzbyXfalcon
Joined: 02 Feb 2011
Total Posts: 1311
05 Oct 2013 12:45 PM
I'm guessing you could do with a few of these:

:WaitForChild("Script")

-Believe and you will achieve-
Report Abuse
randomsmileyface is not online. randomsmileyface
Joined: 01 Aug 2010
Total Posts: 4538
05 Oct 2013 01:51 PM
now, there is no error message.
just it doesn't work
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