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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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
|
  |
| Joined: 30 May 2009 |
| Total Posts: 3973 |
|
| |
|
lawl60ftw
|
  |
| Joined: 30 May 2009 |
| Total Posts: 3973 |
|
| |
|
Bebee2
|
  |
| Joined: 17 May 2009 |
| Total Posts: 3985 |
|
|
| 17 Aug 2013 11:32 AM |
| Put. It. In. A. Local. Script. |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| 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
|
  |
| Joined: 17 Aug 2010 |
| Total Posts: 8210 |
|
| |
|
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
|
  |
| Joined: 17 Aug 2010 |
| Total Posts: 8210 |
|
| |
|
OldGoldie
|
  |
| Joined: 17 Aug 2010 |
| Total Posts: 8210 |
|
| |
|
OldGoldie
|
  |
| Joined: 17 Aug 2010 |
| Total Posts: 8210 |
|
| |
|
OldGoldie
|
  |
| Joined: 17 Aug 2010 |
| Total Posts: 8210 |
|
| |
|
OldGoldie
|
  |
| Joined: 17 Aug 2010 |
| Total Posts: 8210 |
|
| |
|
OldGoldie
|
  |
| Joined: 17 Aug 2010 |
| Total Posts: 8210 |
|
| |
|
OldGoldie
|
  |
| Joined: 17 Aug 2010 |
| Total Posts: 8210 |
|
| |
|