Kloiz
|
  |
| Joined: 29 Jan 2010 |
| Total Posts: 378 |
|
|
| 20 Apr 2014 05:12 PM |
Error: '=' expected near 'local'
Script:
local distance= 20
wait(.5) while not game.Players.LocalPlayer.Character:FindFirstChild ("Right Arm") do wait() end local cam= workspace.CurrentCamera cam.CameraType= 'Custom' cam.CameraType= 'Scriptable' local right arm= game.Players.LocalPlayer.Character.Right Arm
local RunService = Game:GetService('RunService') while RunService.Stepped:wait() do cam.CoordinateFrame= CFrame.new(Vector3.new(rightarm.Position.x + 10, rightarm.Position.y + distance, rightarm.Position.Z + 10),rightarm.Position) end
|
|
|
| Report Abuse |
|
|
Kloiz
|
  |
| Joined: 29 Jan 2010 |
| Total Posts: 378 |
|
| |
|
|
| 20 Apr 2014 05:25 PM |
"while not game.Players.LocalPlayer.Character:FindFirstChild ("Right Arm") do wait() end" Ew... just do this:
while game.Players.LocalPlayer.Character:FindFirstChild("Right Arm") do
Then add another end at the end of the script.
Here's my siggy... Done. |
|
|
| Report Abuse |
|
|
youssef04
|
  |
| Joined: 22 Jan 2011 |
| Total Posts: 1745 |
|
|
| 20 Apr 2014 05:25 PM |
This should work now: local distance= 20
wait(.5) while not game.Players.LocalPlayer.Character:FindFirstChild ["Right Arm"] do wait() end local cam= workspace.CurrentCamera cam.CameraType= 'Custom' cam.CameraType= 'Scriptable' local right arm = game.Players.LocalPlayer.Character["Right Arm"]
local RunService = Game:GetService('RunService') while RunService.Stepped:wait() do cam.CoordinateFrame= CFrame.new(Vector3.new(rightarm.Position.x + 10, rightarm.Position.y + distance, rightarm.Position.Z + 10),rightarm.Position) end |
|
|
| Report Abuse |
|
|
|
| 20 Apr 2014 05:25 PM |
And also, don't forget a wait(), otherwise roblox will crash when you test the script.
Here's my siggy... Done. |
|
|
| Report Abuse |
|
|
|
| 20 Apr 2014 05:26 PM |
Ignore me, I'm going to sleep. XD
Here's my siggy... Done. |
|
|
| Report Abuse |
|
|
youssef04
|
  |
| Joined: 22 Jan 2011 |
| Total Posts: 1745 |
|
|
| 20 Apr 2014 05:26 PM |
| @Sprongo, when I went on studio to see what line the error was, and I did type end again and it get me an error. |
|
|
| Report Abuse |
|
|
Kloiz
|
  |
| Joined: 29 Jan 2010 |
| Total Posts: 378 |
|
| |
|
youssef04
|
  |
| Joined: 22 Jan 2011 |
| Total Posts: 1745 |
|
|
| 20 Apr 2014 05:26 PM |
| Oh lol, Sprongo, have you seen the "Go to sleep" vine. It's so funny. |
|
|
| Report Abuse |
|
|
|
| 20 Apr 2014 05:27 PM |
@youssef Read above your post. And also, my name is Spongo, not Sprongo. XD
Here's my siggy... Done. |
|
|
| Report Abuse |
|
|
youssef04
|
  |
| Joined: 22 Jan 2011 |
| Total Posts: 1745 |
|
|
| 20 Apr 2014 05:28 PM |
| My bad, I just passed 666 forum posts, and I have a fire hat on. AGH SATIN |
|
|
| Report Abuse |
|
|
Kloiz
|
  |
| Joined: 29 Jan 2010 |
| Total Posts: 378 |
|
|
| 20 Apr 2014 05:35 PM |
wait, @yousself04
local distance= 20
wait(.5) while not game.Players.LocalPlayer.Character:FindFirstChild ["Right Arm"] do wait() end local cam= workspace.CurrentCamera cam.CameraType= 'Custom' cam.CameraType= 'Scriptable' local right arm = game.Players.LocalPlayer.Character["Right Arm"]
local RunService = Game:GetService('RunService') while RunService.Stepped:wait() do cam.CoordinateFrame= CFrame.new(Vector3.new(rightarm.Position.x + 10, rightarm.Position.y + distance, rightarm.Position.Z + 10),rightarm.Position) end
The script gives me an error on line 4 (while not game.Players.LocalPlayer.Character:FindFirstChild ["Right Arm"] do wait() end) Error: function arguments expected near '[' |
|
|
| Report Abuse |
|
|
youssef04
|
  |
| Joined: 22 Jan 2011 |
| Total Posts: 1745 |
|
|
| 20 Apr 2014 05:38 PM |
DO NOT CHANGE ANYTHING
local distance= 20
wait(.5) while not game.Players.LocalPlayer.Character:FindFirstChild ["Right Arm"] do wait() end local cam= workspace.CurrentCamera cam.CameraType= 'Custom' cam.CameraType= 'Scriptable' local rightarm = game.Players.LocalPlayer["Right Arm"]
local RunService = Game:GetService('RunService') while RunService.Stepped:wait() do cam.CoordinateFrame= CFrame.new(Vector3.new(rightarm.Position.x + 10, rightarm.Position.y + distance, rightarm.Position.Z + 10),rightarm.Position) end |
|
|
| Report Abuse |
|
|
Kloiz
|
  |
| Joined: 29 Jan 2010 |
| Total Posts: 378 |
|
|
| 20 Apr 2014 05:38 PM |
I didn't It's STILL giving me an error. |
|
|
| Report Abuse |
|
|
youssef04
|
  |
| Joined: 22 Jan 2011 |
| Total Posts: 1745 |
|
|
| 20 Apr 2014 05:39 PM |
THIS ONE SHOULD WORK HOPEFULLY, NOT THE OTHER ONE
local distance= 20
wait(.5) while not game.Players.LocalPlayer:FindFirstChild["Right Arm"] do wait() end local cam= workspace.CurrentCamera cam.CameraType= 'Custom' cam.CameraType= 'Scriptable' local rightarm = game.Players.LocalPlayer["Right Arm"]
local RunService = Game:GetService('RunService') while RunService.Stepped:wait() do cam.CoordinateFrame= CFrame.new(Vector3.new(rightarm.Position.x + 10, rightarm.Position.y + distance, rightarm.Position.Z + 10),rightarm.Position) end |
|
|
| Report Abuse |
|
|
youssef04
|
  |
| Joined: 22 Jan 2011 |
| Total Posts: 1745 |
|
|
| 20 Apr 2014 05:39 PM |
| I didn't realise the error was on line 4, but the other one should work. |
|
|
| Report Abuse |
|
|
Kloiz
|
  |
| Joined: 29 Jan 2010 |
| Total Posts: 378 |
|
|
| 20 Apr 2014 05:41 PM |
For some reason it gives me the same error :C I'm pretty sure that's the same script, though. |
|
|
| Report Abuse |
|
|
Kloiz
|
  |
| Joined: 29 Jan 2010 |
| Total Posts: 378 |
|
|
| 20 Apr 2014 05:42 PM |
Nevermind, not the same script. But still the same error |
|
|
| Report Abuse |
|
|
youssef04
|
  |
| Joined: 22 Jan 2011 |
| Total Posts: 1745 |
|
| |
|
youssef04
|
  |
| Joined: 22 Jan 2011 |
| Total Posts: 1745 |
|
|
| 20 Apr 2014 05:50 PM |
I took your script, gave it my script potion, it should work now, I put it in studio, editted it and now there is no error, here is the script:
local distance= 20
wait(.5) while not game.Players.LocalPlayer["Right Arm"] do wait() end local cam = workspace.CurrentCamera cam.CameraType= 'Custom' cam.CameraType= 'Scriptable' local right arm = game.Players.LocalPlayer.Character["Right Arm"]
local RunService = Game:GetService('RunService') while RunService.Stepped:wait() do cam.CoordinateFrame= CFrame.new(Vector3.new(rightarm.Position.x + 10, rightarm.Position.y + distance, rightarm.Position.Z + 10),rightarm.Position) end |
|
|
| Report Abuse |
|
|
|
| 21 Apr 2014 02:46 AM |
@youssef Variables can't have spaces, I believe. @OP Try this:
wait(.5) while not game.Players.LocalPlayer.Character:FindFirstChild("Right Arm") do wait() end local cam = workspace.CurrentCamera cam.CameraType= 'Custom' cam.CameraType= 'Scriptable' local rarm = game.Players.LocalPlayer.Character["Right Arm"]
local RunService = Game:GetService('RunService') while RunService.Stepped:wait() do cam.CoordinateFrame= CFrame.new(Vector3.new(rarm.Position.x + 10, rarm.Position.y + distance, rarm.Position.Z + 10),rarm.Position) end
Here's my siggy... Done. |
|
|
| Report Abuse |
|
|
Kloiz
|
  |
| Joined: 29 Jan 2010 |
| Total Posts: 378 |
|
|
| 21 Apr 2014 12:24 PM |
@Spongo
It doesn't work. Try your script in studio. |
|
|
| Report Abuse |
|
|