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

Previous Thread :: Next Thread 
lawl60ftw is not online. lawl60ftw
Joined: 30 May 2009
Total Posts: 3973
16 Aug 2013 08:59 AM
I've read through it several times and I can't see any visible errors, any ideas?


wait(1)
local cam = game.Workspace.CurrentCamera
player2 = game.Players.LocalPlayer
character = player2.Character
xv = 0
yv = 12
zv = 15
-------------------------------------------------------------------
torsox = character.Torso.Position.X + xv
torsoy = character.Torso.Position.Y + yv
torsoz = character.Torso.Position.Z + zv
tx = torsox
ty = torsoy
tz = torsoz
cam.CoordinateFrame = CFrame.new(torsox, torsoy, torsoz)
cam.CameraSubject = character.Head


while true do
if script.Parent.Zoomincount.Value > 0 then
if yv > 5 and zv > 6.6 then
yv = yv - 1
zv = zv - 1.2
script.Parent.Zoomincount.Value = script.Parent.Zoomincount.Value - 1
else
script.Parent.Zoomincount.Value = script.Parent.Zoomincount.Value - 1
end
if yv < 5 and zv < 6.6 then
yv = 6
zv = 7.8
script.Parent.Zoomincount.Value = 0
end
end
if script.Parent.Zoomoutcount.Value > 0 then
if yv < 20 and zv < 24.6 then
yv = yv + 1
zv = zv + 1.2
script.Parent.Zoomoutcount.Value = script.Parent.Zoomoutcount.Value - 1
else
script.Parent.Zoomoutcount.Value = script.Parent.Zoomoutcount.Value - 1
end
if yv > 20 and zv > 24.6 then
yv = 19
zv = 23.4
script.Parent.Zoomoutcount.Value = 0
end
end
torsox = character.Torso.Position.X + xv
torsoy = character.Torso.Position.Y + yv
torsoz = character.Torso.Position.Z + zv
if tx ~= torsox then
if tx < torsox then
tx = tx + 0.2
end
if tx > torsox then
tx = tx - 0.2
end
end
if ty ~= torsoy then
if ty < torsoy then
ty = ty + 0.4
end
if ty > torsoy then
ty = ty - 0.4
end
end
tz = torsoz
cam.CoordinateFrame = CFrame.new(tx,ty,tz)
cam.CameraSubject = character.Head
wait()
end
Report Abuse
CeaselessSoul is not online. CeaselessSoul
Joined: 03 Jul 2012
Total Posts: 7506
16 Aug 2013 09:00 AM
You can't use LocalPlayer in a normal Script.

Made my own virtual virtual log in, umad? http://www.roblox.com/test-place?id=94130553
Report Abuse
lawl60ftw is not online. lawl60ftw
Joined: 30 May 2009
Total Posts: 3973
16 Aug 2013 09:06 AM
Even if it's a localscript?

( I'm sort of oblivious to these little facts, it's nice to know these things so I can keep them in mind)
Report Abuse
CeaselessSoul is not online. CeaselessSoul
Joined: 03 Jul 2012
Total Posts: 7506
16 Aug 2013 09:09 AM
You can if it's in a LocalScript.

Made my own virtual virtual log in, umad? http://www.roblox.com/test-place?id=94130553
Report Abuse
lawl60ftw is not online. lawl60ftw
Joined: 30 May 2009
Total Posts: 3973
16 Aug 2013 09:12 AM
But it is in a LocalScript, so should I just not use LocalPlayer or is that not the problem?
Report Abuse
CeaselessSoul is not online. CeaselessSoul
Joined: 03 Jul 2012
Total Posts: 7506
16 Aug 2013 09:16 AM
Oh, that shouldn't be the problem.

Made my own virtual virtual log in, umad? http://www.roblox.com/test-place?id=94130553 <- Sig
Report Abuse
PRESTIGIOUSaLEGEND is not online. PRESTIGIOUSaLEGEND
Joined: 16 Apr 2011
Total Posts: 1765
16 Aug 2013 09:18 AM
where is the script located, remember it needs to be put into every player, i suggest putting it in startergui.
Report Abuse
lawl60ftw is not online. lawl60ftw
Joined: 30 May 2009
Total Posts: 3973
16 Aug 2013 09:21 AM
It's located inside a ScreenGui, is that okay?
Report Abuse
lawl60ftw is not online. lawl60ftw
Joined: 30 May 2009
Total Posts: 3973
16 Aug 2013 09:26 AM
Would you recommend that I put in a PlayerAdded feature to trigger this script or would that be unnecessary?
Report Abuse
PRESTIGIOUSaLEGEND is not online. PRESTIGIOUSaLEGEND
Joined: 16 Apr 2011
Total Posts: 1765
16 Aug 2013 10:26 AM
its fine where it is, there must be something wrong with your code and not the event
Report Abuse
Bebee2 is not online. Bebee2
Joined: 17 May 2009
Total Posts: 3985
16 Aug 2013 10:34 AM
IN STUDIO... LOCALSCRIPTS AND SCRIPTS ARE BASICALLY THE SAME. I'm getting that out right now.

So... since the camera is a local object, you make it so the script is local.


Report Abuse
lawl60ftw is not online. lawl60ftw
Joined: 30 May 2009
Total Posts: 3973
17 Aug 2013 12:43 AM
Bump
Report Abuse
lawl60ftw is not online. lawl60ftw
Joined: 30 May 2009
Total Posts: 3973
17 Aug 2013 10:51 AM
bump.
Report Abuse
Bebee2 is not online. Bebee2
Joined: 17 May 2009
Total Posts: 3985
17 Aug 2013 11:32 AM
Put. It. In. A. Local. Script.
Report Abuse
CeaselessSoul is not online. CeaselessSoul
Joined: 03 Jul 2012
Total Posts: 7506
17 Aug 2013 11:36 AM
It is in one stupid..

Made my own virtual virtual log in, umad? http://www.roblox.com/test-place?id=94130553 <- Sig
Report Abuse
lawl60ftw is not online. lawl60ftw
Joined: 30 May 2009
Total Posts: 3973
20 Aug 2013 04:11 AM
Please do take time to read things before posting, Bebee.

Bump.
Report Abuse
OldGoldie is not online. OldGoldie
Joined: 17 Aug 2010
Total Posts: 8210
20 Aug 2013 04:12 AM
get out
Report Abuse
lawl60ftw is not online. lawl60ftw
Joined: 30 May 2009
Total Posts: 3973
20 Aug 2013 04:14 AM
Do you even remember who I am, Goldie?

Go get your forum posts up elsewhere.
Report Abuse
OldGoldie is not online. OldGoldie
Joined: 17 Aug 2010
Total Posts: 8210
20 Aug 2013 04:16 AM
my name is roooobot
Report Abuse
OldGoldie is not online. OldGoldie
Joined: 17 Aug 2010
Total Posts: 8210
20 Aug 2013 04:18 AM
i dun wanna b a chicken
Report Abuse
OldGoldie is not online. OldGoldie
Joined: 17 Aug 2010
Total Posts: 8210
20 Aug 2013 04:20 AM
LEL
Report Abuse
OldGoldie is not online. OldGoldie
Joined: 17 Aug 2010
Total Posts: 8210
20 Aug 2013 04:22 AM
umadbro
Report Abuse
OldGoldie is not online. OldGoldie
Joined: 17 Aug 2010
Total Posts: 8210
20 Aug 2013 04:25 AM
my name is roooobot
Report Abuse
OldGoldie is not online. OldGoldie
Joined: 17 Aug 2010
Total Posts: 8210
20 Aug 2013 04:29 AM
no way
Report Abuse
OldGoldie is not online. OldGoldie
Joined: 17 Aug 2010
Total Posts: 8210
20 Aug 2013 04:32 AM
FAKE FAKE
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