DjBadyBoy
|
  |
| Joined: 01 Aug 2011 |
| Total Posts: 681 |
|
|
| 13 Dec 2013 04:26 AM |
Just wanted to ask if anyone could help by fixing this script for me.
Pos = script.Parent.Position while true do wait(1) Pos.X = Pos.X + 5 end
thank you. |
|
|
| Report Abuse |
|
|
|
| 13 Dec 2013 04:42 AM |
p = script.Parent while wait(1) do p.Position.X = p.Position.X + 5 end |
|
|
| Report Abuse |
|
|
DjBadyBoy
|
  |
| Joined: 01 Aug 2011 |
| Total Posts: 681 |
|
|
| 13 Dec 2013 04:47 AM |
@KiwiMeister
I get this in the output. 13:46:55.028 - X cannot be assigned to |
|
|
| Report Abuse |
|
|
|
| 13 Dec 2013 04:53 AM |
p = script.Parent while wait(1) do p.Position = Vector3.new(p.Position + 1,0,0) end Try this. |
|
|
| Report Abuse |
|
|
DjBadyBoy
|
  |
| Joined: 01 Aug 2011 |
| Total Posts: 681 |
|
|
| 13 Dec 2013 07:58 AM |
@KiwiMeister
16:58:39.528 - Workspace.Part.lol:3: bad argument #2 to '?' (Vector3 expected, got number) |
|
|
| Report Abuse |
|
|
Nyxis
|
  |
| Joined: 15 Nov 2012 |
| Total Posts: 3374 |
|
|
| 13 Dec 2013 09:00 AM |
I'll give it a shot I guess..
p = script.Parent while wait(1) do p.CFrame = P.CFrame + Vector3.new(0, 0, 0) --Change the Vector3 to what ever direction you want it to go.. end |
|
|
| Report Abuse |
|
|
|
| 13 Dec 2013 09:03 AM |
your all wrong :D
p = script.Parent while wait(1)do p.Position = P.Position + Vector3.new(5, 0, 0) end
or this
p = script.Parent while wait(1)do p.CFrame = P.CFrame + CFrame.new(5, 0, 0) end |
|
|
| Report Abuse |
|
|
Nyxis
|
  |
| Joined: 15 Nov 2012 |
| Total Posts: 3374 |
|
|
| 13 Dec 2013 09:05 AM |
@Brink, actually mine is also correct.
Unless I made some sort of nonexistence error since I wrote it in the reply. |
|
|
| Report Abuse |
|
|
|
| 13 Dec 2013 09:06 AM |
| ah i didnt see your script yeah that one should work to |
|
|
| Report Abuse |
|
|
Nyxis
|
  |
| Joined: 15 Nov 2012 |
| Total Posts: 3374 |
|
|
| 13 Dec 2013 09:08 AM |
>>>>
p = script.Parent while wait(1)do p.CFrame = P.CFrame + CFrame.new(5, 0, 0) end
>>>>
Two errors in it:
10:07:03.319 - Workspace.Part.Script:3: attempt to index global 'P' (a nil value)
10:07:20.662 - Workspace.Part.Script:3: bad argument #2 to '?' (Vector3 expected, got userdata) |
|
|
| Report Abuse |
|
|
iLiminate
|
  |
| Joined: 26 Feb 2012 |
| Total Posts: 388 |
|
|
| 13 Dec 2013 10:29 AM |
You could simply do this:
p = script.Parent while wait(1) do p.Position = Vector3.new(p.Position.X + 1,0,0) end
|
|
|
| Report Abuse |
|
|
iLiminate
|
  |
| Joined: 26 Feb 2012 |
| Total Posts: 388 |
|
|
| 13 Dec 2013 10:31 AM |
My bad, not trying to double post but heres it fixed:
p = script.Parent while wait(1) do p.CFrame = Vector3.new(p.Position.X + 5,0,0) end |
|
|
| Report Abuse |
|
|
Nyxis
|
  |
| Joined: 15 Nov 2012 |
| Total Posts: 3374 |
|
|
| 13 Dec 2013 11:46 AM |
@iLiminate
LOL nope!
Your script errors.
12:45:21.086 - Workspace.Part.Script:3: bad argument #3 to 'CFrame' (CFrame expected, got userdata) |
|
|
| Report Abuse |
|
|
iLiminate
|
  |
| Joined: 26 Feb 2012 |
| Total Posts: 388 |
|
|
| 13 Dec 2013 12:23 PM |
Whelp, here it is fixed:
p = script.Parent while wait(1) do p.CFrame = Vector3.new(p.CFrame.X + 5,0,0) end
if CFrame.X doesn't work try CFrame.x |
|
|
| Report Abuse |
|
|