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 » Scripters
Home Search
 

Re: Script works fine in offline mode, not online

Previous Thread :: Next Thread 
ArceusLevelX is not online. ArceusLevelX
Joined: 16 Apr 2013
Total Posts: 762
27 Jan 2015 07:22 PM
This is a LocalScript inside the player's character.

local cam = workspace.CurrentCamera
cam.CameraSubject=workspace.Part
cam.CameraType = "Follow"
local target = workspace.FOCUS
local camera = workspace.CurrentCamera
camera.CameraSubject = target

local angle = 0

while wait() do
camera.CoordinateFrame = CFrame.new(target.Position)
* CFrame.Angles(0, angle, 0)
* CFrame.new(0, 0, 5)
angle = angle + math.rad(1)
end
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
27 Jan 2015 07:25 PM
That looks like it should work perfectly. Make sure the script that copies it is working. You know, it would be a lot easier to put it in StarterGui? It automatically runs on the client in PlayerGui, and it automatically gets copied.
Report Abuse
DoctorBloxor is not online. DoctorBloxor
Joined: 07 Feb 2012
Total Posts: 3222
27 Jan 2015 08:23 PM
add a wait(1) to the beginning of the script. It isn't working because when it executes nothing is loaded, so you need for it to wait.
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
27 Jan 2015 08:25 PM
That shouldn't be the problem, since their character has already loaded.
Report Abuse
DoctorBloxor is not online. DoctorBloxor
Joined: 07 Feb 2012
Total Posts: 3222
27 Jan 2015 08:26 PM
Nah, trust me. I had the same error. I added the wait and it worked fine. The script loads before the player... Kind of weird.
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
27 Jan 2015 08:33 PM
Oh right. The client is still loading the character, but the server sees the character fully loaded, and inserts the script.
Report Abuse
ArceusLevelX is not online. ArceusLevelX
Joined: 16 Apr 2013
Total Posts: 762
27 Jan 2015 08:50 PM
In online the camera looks at the wrong place.
Report Abuse
DoctorBloxor is not online. DoctorBloxor
Joined: 07 Feb 2012
Total Posts: 3222
27 Jan 2015 08:51 PM
Probably an area with script. Which I have no idea because I don't mess with this stuff.. So have fun guys!
Report Abuse
ArceusLevelX is not online. ArceusLevelX
Joined: 16 Apr 2013
Total Posts: 762
27 Jan 2015 09:17 PM
Bump.
Report Abuse
ArceusLevelX is not online. ArceusLevelX
Joined: 16 Apr 2013
Total Posts: 762
27 Jan 2015 09:32 PM
Bump again.
Report Abuse
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
27 Jan 2015 09:33 PM
Put this at the front


Uncompresed:
repeat
wait(1)
until game.Players.LocalPlayer.Character -- That waits until chracter is true


Compressed:
repeat wait(1) until game.Players.LocalPlayer.Character
Report Abuse
ArceusLevelX is not online. ArceusLevelX
Joined: 16 Apr 2013
Total Posts: 762
27 Jan 2015 09:49 PM
The camera is looking in the wrong place.
Report Abuse
ArceusLevelX is not online. ArceusLevelX
Joined: 16 Apr 2013
Total Posts: 762
28 Jan 2015 12:41 PM
Bump.
Report Abuse
epicbreaker is not online. epicbreaker
Joined: 23 Apr 2011
Total Posts: 2791
28 Jan 2015 01:46 PM
camera.CoordinateFrame = CFrame.new(target.Position, Object_To_Look_At.Position)
Report Abuse
ArceusLevelX is not online. ArceusLevelX
Joined: 16 Apr 2013
Total Posts: 762
28 Jan 2015 05:55 PM
I don't understand. The object I want the camera to look at is a part named FOCUS, which is what target is defined as.
Report Abuse
ArceusLevelX is not online. ArceusLevelX
Joined: 16 Apr 2013
Total Posts: 762
28 Jan 2015 06:41 PM
Bump.
Report Abuse
ArceusLevelX is not online. ArceusLevelX
Joined: 16 Apr 2013
Total Posts: 762
28 Jan 2015 07:16 PM
Bump.
Report Abuse
epicbreaker is not online. epicbreaker
Joined: 23 Apr 2011
Total Posts: 2791
28 Jan 2015 07:51 PM
Then in the second arguement, put workspace.FOCUS.Position

At least try it.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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