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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 03 Sep 2009 |
| Total Posts: 9316 |
|
|
| 04 Apr 2012 04:25 PM |
| Put the _G in a local script too. Tadah! |
|
|
| Report Abuse |
|
|