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: Subject title cannot be more than 60 characters.

Previous Thread :: Next Thread 
Alex645ca is not online. Alex645ca
Joined: 02 Feb 2009
Total Posts: 2531
04 Apr 2012 03:00 PM
bin = script.Parent
player = bin.Parent.Parent
cam = workspace.CurrentCamera

function onclick(mouse)
if cam.CameraSubject.Parent == nil then
atom = _G.spawnmob("Atom", 1, Vector3.new(0, 5, 0), 300)
cam.CameraSubject = atom
cam.CameraType = "Follow"
cam.FieldOfView = atom.Head.NumProtons.Value
else
cam.FieldOfView = cam.CameraSubject.Parent.Head.NumProtons.Value
end
end

function onsel(mouse)
mouse.Button1Down:connect(function() onclick(mouse) end)
end

bin.Selected:connect(onsel)


The _G.spawnmob function, please don't ask what it does, it's derply obvious if you know what you're doing. :P
Report Abuse
L2000 is not online. L2000
Joined: 03 Apr 2008
Total Posts: 77448
04 Apr 2012 03:11 PM
I've seen that usually when something works in solo but not online means that you need it in a LocalScript (For this, it's likely due to the camera part; cameras only work in LocalScripts).

Try putting this in a LocalScript, then see if it works.
Report Abuse
Alex645ca is not online. Alex645ca
Joined: 02 Feb 2009
Total Posts: 2531
04 Apr 2012 04:13 PM
@L2000
Problem is it requires access to a _G function which localscripts cannot do. :l
Report Abuse
Quenty is not online. Quenty
Joined: 03 Sep 2009
Total Posts: 9316
04 Apr 2012 04:25 PM
Put the _G in a local script too. Tadah!
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