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)

1 comment
For line 8, are you trying to check if the part's name is either of those? And for line 12, you're checking if the object is true - which will error b/c if it isn't there - and I can only assume you're using a BooleanValue object; you need to check if its property is true. (BooleanValue.Value = Boolean)