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: help.

Previous Thread :: Next Thread 
gravedigger1994 is not online. gravedigger1994
Joined: 08 May 2008
Total Posts: 2567
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
gravedigger1994 is not online. gravedigger1994
Joined: 08 May 2008
Total Posts: 2567
03 Dec 2012 06:10 PM
bump
Report Abuse
crouton04 is not online. 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
gravedigger1994 is not online. gravedigger1994
Joined: 08 May 2008
Total Posts: 2567
03 Dec 2012 06:37 PM
bump
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