|
| 03 Dec 2012 06:06 PM |
So why does this script work in Solo mode but not Play mode, is it another stupid update roblox made to break dozens of more scripts or what?
function onClicked() local w = game.Workspace:getChildren() for i = 1, #w do if (w[i].className == "Camera") or (w[i].className == "Cam" .. game.Players.LocalPlayer.Character.Name) then if w[i].CameraSubject == game.Players.LocalPlayer.Character.Humanoid then -- do not edit this up --
w[i].CameraSubject = game.Workspace:findFirstChild("Camera1") -- Chels or whoever. edit this part- "...game.Workspace.____:findFirstChild" -- where the underscore is, list what model the "Camera1" is in. For example, 'game.Workspace.Car*:findFirstChild' If the 'Camera1' is in 'Car' in the -- Workspace, then that is where it is listed. If it is located in 'game.Workspace.Car.Parts', then that is what you will right.
-- do not edit this down -- w[i].CameraType = "Track" w[i].Name = "Cam" .. game.Players.LocalPlayer.Character.Name else w[i].CameraSubject = game.Players.LocalPlayer.Character.Humanoid w[i].CameraType = "Custom" end end end end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
|
|
|
| Report Abuse |
|
| |
crouton04
|
  |
| Joined: 07 Jul 2010 |
| Total Posts: 4459 |
|
|
| 03 Dec 2012 06:14 PM |
| why not just use game.Workspace.Camera1.. You don't need findfirstchild.. |
|
|
| Report Abuse |
|
| |