You see, the flr.Value is an IntValue and I'm comparing it to the Number 2 and it isn't working. Here's the code.
flr = script.Parent.Parent.Parent.Floor
prm = script.Parent.Parent.Parent.PrimaryPart
script.Parent.OnServerEvent:Connect(function(WhichFloor)
if WhichFloor > flr.Value then
for v = 0,WhichFloor,1 do
for i = 0,200,1 do
script.Parent:SetPrimaryPartCFrame(CFrame.new(prm.Position.X,prm.Position.Y + 0.1,prm.Position.Z))
wait(0.01)
end
flr.Value = flr.Value + 1
end
else
for v = 0,WhichFloor,1 do
for i = 0,200,1 do
script.Parent:SetPrimaryPartCFrame(CFrame.new(prm.Position.X,prm.Position.Y - 0.1,prm.Position.Z))
wait(0.01)
end
flr.Value = flr.Value - 1
end
end
end)
WhichFloor is 2 btw

1 comment
By The way, when I said print(flr.value) it spat out 0. So I'm really confused.