this script is inside a tool/ card the tool also has a value if the tool touches the door/(a part thats invisible inside the door model) if the value is true then
the door is supposed to lerp (im gonna script that later), i set the print(hello,4,3,2,1) there to see if it gets trough the if statements wich it doesnt for some reason it only prints the 'hello4'( the first one )
is there someone that can explain this to me ?
Note: if you have any questions or need more information i can react for 4 more hours i'll check every 10-15 mins
True = script.Parent.True card = script.Parent.Handle --- card.Touched:connect(function(otherPart) print('hello4') if otherPart.Name == 'Touch,Color1,Color2' then print('hello3') if otherPart.Parent.Name == 'DoorLerp, Card, CardT' then print('hello2') if True == true then local DoorL = otherPart.Parent local D1 = DoorL.Door1 local D2 = DoorL.Door2 local C1 = DoorL.Color1 local C2 = DoorL.Color2 local D1mPos = D1.Position local D1To = Vector3.new(-96.66, 4, -29.219) local D2mPos = D2.Position local D2To = Vector3.new(-96.76, 4, -35.068) --- print('hello') for ratio = 0,1,0.01 do end end end end end)
True = script.Parent.True card = script.Parent.Handle --- card.Touched:connect(function(otherPart) print('hello4') if otherPart.Name == 'Touch' or otherPart.Name == 'Color1' or otherPart.Name == ' 'Color2' then --This might be how it should go, but im not sure, you can always revert print('hello3') if otherPart.Parent.Name == 'DoorLerp' or otherPart.Parent.Name == 'Card ' or otherPart.Parent.Name == 'CardT' then --This might be how it should go, but im not sure, you can always revert print('hello2') if True.Value == true then --It should be True.Value local DoorL = otherPart.Parent local D1 = DoorL.Door1 local D2 = DoorL.Door2 local C1 = DoorL.Color1 local C2 = DoorL.Color2 local D1mPos = D1.Position local D1To = Vector3.new(-96.66, 4, -29.219) local D2mPos = D2.Position local D2To = Vector3.new(-96.76, 4, -35.068) --- print('hello') for ratio = 0,1,0.01 do end end end end end)