killjoy37
|
  |
| Joined: 27 Aug 2008 |
| Total Posts: 2821 |
|
|
| 28 May 2012 06:26 PM |
if v.Position.Z == 55.5 then does not work, nothing in output |
|
|
| Report Abuse |
|
|
|
| 28 May 2012 06:32 PM |
That looks like correct syntax to me. Is v.Position.Z nil?
~Read Between The Squiggles~ |
|
|
| Report Abuse |
|
|
|
| 28 May 2012 06:34 PM |
v.Position.Z == 55.5
Im not sure if that will work.
Try it with CFrame.
v.CFrame.Z == 55.5 |
|
|
| Report Abuse |
|
|
killjoy37
|
  |
| Joined: 27 Aug 2008 |
| Total Posts: 2821 |
|
|
| 28 May 2012 06:34 PM |
no. I don't even know how that could be possible lol I tried putting .Value after the Z and it gave me a red error in the output "attempt to index field 'Z' (a number value) |
|
|
| Report Abuse |
|
|
|
| 28 May 2012 06:38 PM |
if v.CFrame.z == 55.5 then print("oyus") else print("nawp") end |
|
|
| Report Abuse |
|
|
killjoy37
|
  |
| Joined: 27 Aug 2008 |
| Total Posts: 2821 |
|
|
| 28 May 2012 06:41 PM |
| CFrame did not work either |
|
|
| Report Abuse |
|
|
|
| 28 May 2012 06:46 PM |
if v.Positon.z == 55.5 then print("oyus") else print(v.Position.z .. " ~= 55.5") end |
|
|
| Report Abuse |
|
|
killjoy37
|
  |
| Joined: 27 Aug 2008 |
| Total Posts: 2821 |
|
|
| 28 May 2012 06:47 PM |
| Why are you typing that? Are you saying that z does not need to be capitalized? |
|
|
| Report Abuse |
|
|
killjoy37
|
  |
| Joined: 27 Aug 2008 |
| Total Posts: 2821 |
|
| |
|
killjoy37
|
  |
| Joined: 27 Aug 2008 |
| Total Posts: 2821 |
|
| |
|
malachi11
|
  |
| Joined: 07 May 2008 |
| Total Posts: 2420 |
|
|
| 28 May 2012 08:18 PM |
z, y, and x are read-only properties of Vector3. You could do this:
p.Position=Vector3.new(p.Position.x,p.Position.y,number) |
|
|
| Report Abuse |
|
|
|
| 28 May 2012 08:20 PM |
| Is this part of a larger script? |
|
|
| Report Abuse |
|
|
|
| 28 May 2012 08:20 PM |
| Dokes, the chances of it being EXACTLY 55.5 are next to 0. Try checking if it's between 55.4 and 55.6 |
|
|
| Report Abuse |
|
|
killjoy37
|
  |
| Joined: 27 Aug 2008 |
| Total Posts: 2821 |
|
|
| 28 May 2012 08:25 PM |
This is part of a larger script. And why would it not be exactly 55.5? It's anchored and that's what it says on it's position. |
|
|
| Report Abuse |
|
|
|
| 28 May 2012 08:26 PM |
| It rounds. Just do as I say, I promise it will work. |
|
|
| Report Abuse |
|
|
killjoy37
|
  |
| Joined: 27 Aug 2008 |
| Total Posts: 2821 |
|
|
| 28 May 2012 08:26 PM |
| I'll try that malachi, good idea. |
|
|
| Report Abuse |
|
|
killjoy37
|
  |
| Joined: 27 Aug 2008 |
| Total Posts: 2821 |
|
|
| 28 May 2012 08:27 PM |
| Will you type the exact thing you want me to try please? |
|
|
| Report Abuse |
|
|
|
| 28 May 2012 08:28 PM |
> z, y, and x are read-only properties of Vector3. You could do this:
Uh, he IS reading them? |
|
|
| Report Abuse |
|
|
killjoy37
|
  |
| Joined: 27 Aug 2008 |
| Total Posts: 2821 |
|
|
| 28 May 2012 08:28 PM |
| my last post was at kingkiller by the way |
|
|
| Report Abuse |
|
|
|
| 28 May 2012 08:28 PM |
| if v.Position.Z > 55.4 and v.Position.Z < 55.6 then |
|
|
| Report Abuse |
|
|
killjoy37
|
  |
| Joined: 27 Aug 2008 |
| Total Posts: 2821 |
|
| |
|
killjoy37
|
  |
| Joined: 27 Aug 2008 |
| Total Posts: 2821 |
|
|
| 28 May 2012 08:40 PM |
| It worked! Thanks for helping me and keeping your promise. |
|
|
| Report Abuse |
|
|