of     1   

cdw500
#138891744Tuesday, July 01, 2014 8:03 PM GMT

I have tried checking for the parts position by: if part.Position == Vector3.new(0,0,0) But that doesn't seem to work any solutions?
Goulstem
#138891957Tuesday, July 01, 2014 8:05 PM GMT

if Part.CFrame == CFrame.new(0,0,0) then Idk why these wouldn't work
cdw500
#138892385Tuesday, July 01, 2014 8:08 PM GMT

This did not work. I will put the entire script at bottom for possible debugging. local DoorL = script.Parent.Parent.DoorL local DoorR = script.Parent.Parent.DoorR local Ele = script.Parent.Parent.ElevatorMain.Floor local wait = false script.Parent.ClickDetector.MouseClick:connect(function() if wait == false then print("1") if Ele.CFrame == CFrame.new(-4.091, 0.591, 71.459) then print("2") for i=1, 20 do Wait() DoorL.CFrame = DoorL.CFrame + Vector3.new(0.1,0,0) DoorR.CFrame = DoorR.CFrame + Vector3.new(-0.1,0,0) end wait = true end end end)
cdw500
#138892829Tuesday, July 01, 2014 8:12 PM GMT

Any one have any solutions?
SenseiWarrior
#138893501Tuesday, July 01, 2014 8:18 PM GMT

if part.Position.Y == 0 and part.Position.X == 0 and part.Position.Z == 0 then
cdw500
#138893952Tuesday, July 01, 2014 8:23 PM GMT

I tryed this in a separate part and it did not work here is the script below. if script.Parent.Position.Y == 0.573 and script.Parent.Position.X == 0 and script.Parent.Position.Z == 0 then print("Here") end
Spectrial
#138894263Tuesday, July 01, 2014 8:26 PM GMT

are you looping it or using a .changed function? try either of these two. while wait(0.1) do if part.Position == Vector3.new(0,0,0) then --code end end or part.Changed:connect(function(a) if part.Position == Vector3.new(0,0,0) then --code end end)
Frostglacier
#138894283Tuesday, July 01, 2014 8:26 PM GMT

The problem seems to be that you have "wait" as a variable, thus confusing the script. The solution would simply be to change your BoolValue "wait" to something else like "time" or "enabled."
ZeroHour66
#138894782Tuesday, July 01, 2014 8:31 PM GMT

Don't use "local wait" at the beginning. wait is only meant to be used as this "wait()" you can't use it as a variable. It confuses the script. so basically what @above said.
cdw500
#138894969Tuesday, July 01, 2014 8:32 PM GMT

Neither of those worked I made a separate part and put a script in it and tryed both with its position and they did not work here is the script. script.Parent.Changed:connect(function(a) if script.Parent.Position == Vector3.new(-7, 0.589, 10) then print("Hi") end end)
Spectrial
#138895237Tuesday, July 01, 2014 8:35 PM GMT

i have a hunch that your part just never hits the exact spot, so i'd put a part where you want your elevator to go and then use magnitude to detect it.
JarodOfOrbiter
#138895539Tuesday, July 01, 2014 8:37 PM GMT

I've had this problem before. Here is my solution to what I think the problem is. function AreVectorsEqual(Value1, Value2) if math.floor(Value1.X*100) == math.floor(Value2.X*100) and math.floor(Value1.Y*100) == math.floor(Value2.Y*100) and math.floor(Value1.Z*100) == math.floor(Value2.Z*100) then return true else return false end
cdw500
#138895729Tuesday, July 01, 2014 8:39 PM GMT

But the part is in the exact position that i have it set as.
Frostglacier
#138895923Tuesday, July 01, 2014 8:41 PM GMT

@cdw, 1. What exactly is not working? Is it the entire script, or just the part you are inquiring on? 2. What have you already tried?
Brick_man
#138896006Tuesday, July 01, 2014 8:41 PM GMT

Roblox scripts never round. Positions do; so yea. Use if (Part1.Position-Goal.Position).magnitude < 1 then print'yes' end
cdw500
#138896095Tuesday, July 01, 2014 8:42 PM GMT

Do you mind explaining this to me?
Spectrial
#138896158Tuesday, July 01, 2014 8:43 PM GMT

instead of using the exact position, we're trying to get it just within the ballpark with a margin of about 1 stud.
cdw500
#138896222Tuesday, July 01, 2014 8:43 PM GMT

it is just the check position part and I have tryed to check the CFrame and the Vector3
cdw500
#138897003Tuesday, July 01, 2014 8:50 PM GMT

I've tryed using magnitude and putting the part under and on top of the part or goal it it did not print yes. i think I need a better explanation of how each part works.
JarodOfOrbiter
#138897905Tuesday, July 01, 2014 8:58 PM GMT

The problem is that even though it claims to be in the exact position, it isn't. So you are comparing two values like 1.2830000000138 and 1.2830000000251 They are close, but not the same. So use the code I mentioned earlier to round the value up to the hunredths' place.
cdw500
#138898022Tuesday, July 01, 2014 8:59 PM GMT

I have found a nice easy solution with magnitude thanks for all of the help!

    of     1